@backstage-community/plugin-azure-devops 0.6.2 → 0.7.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/alpha/plugin.esm.js.map +1 -1
  3. package/dist/alpha.d.ts +12 -12
  4. package/dist/api/AzureDevOpsApi.esm.js.map +1 -1
  5. package/dist/api/AzureDevOpsClient.esm.js.map +1 -1
  6. package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js +1 -1
  7. package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js.map +1 -1
  8. package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js +1 -1
  9. package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js.map +1 -1
  10. package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js +1 -1
  11. package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js.map +1 -1
  12. package/dist/components/BuildTable/BuildTable.esm.js +2 -2
  13. package/dist/components/BuildTable/BuildTable.esm.js.map +1 -1
  14. package/dist/components/EntityPageAzureGitTags/EntityPageAzureGitTags.esm.js.map +1 -1
  15. package/dist/components/EntityPageAzurePipelines/EntityPageAzurePipelines.esm.js.map +1 -1
  16. package/dist/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.esm.js.map +1 -1
  17. package/dist/components/GitTagTable/GitTagTable.esm.js +1 -1
  18. package/dist/components/GitTagTable/GitTagTable.esm.js.map +1 -1
  19. package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js +5 -5
  20. package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js.map +1 -1
  21. package/dist/components/PullRequestTable/PullRequestTable.esm.js +2 -2
  22. package/dist/components/PullRequestTable/PullRequestTable.esm.js.map +1 -1
  23. package/dist/components/PullRequestsPage/PullRequestsPage.esm.js.map +1 -1
  24. package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js +2 -2
  25. package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js.map +1 -1
  26. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js +6 -6
  27. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js.map +1 -1
  28. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js.map +1 -1
  29. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js +5 -6
  30. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js.map +1 -1
  31. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js +1 -1
  32. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js.map +1 -1
  33. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js +1 -1
  34. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js.map +1 -1
  35. package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js +1 -1
  36. package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js.map +1 -1
  37. package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js +4 -5
  38. package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js.map +1 -1
  39. package/dist/components/PullRequestsPage/lib/filters/allFilter.esm.js.map +1 -1
  40. package/dist/components/PullRequestsPage/lib/filters/assignedToTeamFilter.esm.js.map +1 -1
  41. package/dist/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.esm.js.map +1 -1
  42. package/dist/components/PullRequestsPage/lib/filters/assignedToUserFilter.esm.js.map +1 -1
  43. package/dist/components/PullRequestsPage/lib/filters/createFilter.esm.js.map +1 -1
  44. package/dist/components/PullRequestsPage/lib/filters/createdByTeamFilter.esm.js.map +1 -1
  45. package/dist/components/PullRequestsPage/lib/filters/createdByTeamsFilter.esm.js.map +1 -1
  46. package/dist/components/PullRequestsPage/lib/filters/createdByUserFilter.esm.js.map +1 -1
  47. package/dist/components/PullRequestsPage/lib/filters/types.esm.js.map +1 -1
  48. package/dist/components/PullRequestsPage/lib/hooks/useFilterProcessor.esm.js.map +1 -1
  49. package/dist/components/PullRequestsPage/lib/utils.esm.js.map +1 -1
  50. package/dist/components/ReadmeCard/ReadmeCard.esm.js +3 -3
  51. package/dist/components/ReadmeCard/ReadmeCard.esm.js.map +1 -1
  52. package/dist/hooks/useBuildRuns.esm.js.map +1 -1
  53. package/dist/hooks/useDashboardPullRequests.esm.js.map +1 -1
  54. package/dist/hooks/useGitTags.esm.js.map +1 -1
  55. package/dist/hooks/usePullRequests.esm.js.map +1 -1
  56. package/dist/hooks/useReadme.esm.js.map +1 -1
  57. package/dist/hooks/useUserEmail.esm.js.map +1 -1
  58. package/dist/hooks/useUserTeamIds.esm.js.map +1 -1
  59. package/dist/index.d.ts +1 -1
  60. package/dist/plugin.esm.js.map +1 -1
  61. package/dist/routes.esm.js.map +1 -1
  62. package/dist/utils/arrayHas.esm.js.map +1 -1
  63. package/dist/utils/equalsIgnoreCase.esm.js.map +1 -1
  64. package/dist/utils/getAnnotationValuesFromEntity.esm.js.map +1 -1
  65. package/dist/utils/getDurationFromDates.esm.js.map +1 -1
  66. package/package.json +26 -18
  67. package/alpha/package.json +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @backstage-community/plugin-azure-devops
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7ce46dc: Backstage version bump to v1.33.5
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [7ce46dc]
12
+ - @backstage-community/plugin-azure-devops-common@0.5.0
13
+
14
+ ## 0.6.3
15
+
16
+ ### Patch Changes
17
+
18
+ - d71fade: Reverted the MUI v5 migration
19
+
3
20
  ## 0.6.2
4
21
 
5
22
  ### Patch Changes
@@ -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 azureDevOpsGitTagsEntityContent,\n azureDevOpsPullRequestsEntityContent,\n azureDevOpsPullRequestPage,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;AAqCa,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,WAAA;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,iBAAkB,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU,CAA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AAA,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,CAAA;AAAA,OACjD;AAAA,KACJ;AAAA,GACF;AACF,EAAA;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,CAAA;AAAA,KAChC;AAAA,GACJ;AACF,CAAC,EAAA;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,0BAAA;AAAA,GACF;AACF,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';\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 azureDevOpsGitTagsEntityContent,\n azureDevOpsPullRequestsEntityContent,\n azureDevOpsPullRequestPage,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;AAqCa,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,WAAa,EAAA,sBAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,iCAAiC,CAAA;AAAA,IACjE,MAAQ,EAAA,MACN,OAAO,6CAAgC,CAAE,CAAA,IAAA;AAAA,MAAK,OAC5C,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,gBAAA,EAAF,IAAmB,CAAE;AAAA;AACtC;AAEN,CAAC;AAGY,MAAA,iCAAA,GAAoC,uBAAuB,IAAK,CAAA;AAAA,EAC3E,IAAM,EAAA,WAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,YAAA;AAAA,IACb,YAAc,EAAA,WAAA;AAAA,IACd,MA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,IACA,2BAAA;AAAA,IACA,iCAAA;AAAA,IACA,+BAAA;AAAA,IACA,oCAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as _backstage_catalog_model from '@backstage/catalog-model';
1
+ import * as _backstage_catalog_model_index from '@backstage/catalog-model/index';
2
2
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
3
- import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
+ import * as _backstage_core_plugin_api_index from '@backstage/core-plugin-api/index';
4
4
  import React__default from 'react';
5
5
 
6
6
  /** @alpha */
@@ -10,10 +10,10 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
10
10
  name: undefined;
11
11
  config: {};
12
12
  configInput: {};
13
- output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_core_plugin_api.AnyApiFactory, "core.api.factory", {}>;
13
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_core_plugin_api_index.AnyApiFactory, "core.api.factory", {}>;
14
14
  inputs: {};
15
15
  params: {
16
- factory: _backstage_core_plugin_api.AnyApiFactory;
16
+ factory: _backstage_core_plugin_api_index.AnyApiFactory;
17
17
  };
18
18
  }>;
19
19
  "page:azure-devops": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -50,7 +50,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
50
50
  };
51
51
  output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
52
52
  optional: true;
53
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
53
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
54
54
  optional: true;
55
55
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
56
56
  optional: true;
@@ -61,7 +61,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
61
61
  defaultPath: string;
62
62
  defaultTitle: string;
63
63
  routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
64
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
64
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
65
65
  };
66
66
  }>;
67
67
  "entity-content:azure-devops/git-tags": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -79,7 +79,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
79
79
  };
80
80
  output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
81
81
  optional: true;
82
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
82
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
83
83
  optional: true;
84
84
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
85
85
  optional: true;
@@ -90,7 +90,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
90
90
  defaultPath: string;
91
91
  defaultTitle: string;
92
92
  routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
93
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
93
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
94
94
  };
95
95
  }>;
96
96
  "entity-content:azure-devops/pull-requests": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -108,7 +108,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
108
108
  };
109
109
  output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
110
110
  optional: true;
111
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
111
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
112
112
  optional: true;
113
113
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
114
114
  optional: true;
@@ -119,7 +119,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
119
119
  defaultPath: string;
120
120
  defaultTitle: string;
121
121
  routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
122
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
122
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
123
123
  };
124
124
  }>;
125
125
  "entity-card:azure-devops/readme": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -131,7 +131,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
131
131
  configInput: {
132
132
  filter?: string | undefined;
133
133
  };
134
- output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
134
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
135
135
  optional: true;
136
136
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
137
137
  optional: true;
@@ -139,7 +139,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
139
139
  inputs: {};
140
140
  params: {
141
141
  loader: () => Promise<JSX.Element>;
142
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
142
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
143
143
  };
144
144
  }>;
145
145
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"AzureDevOpsApi.esm.js","sources":["../../src/api/AzureDevOpsApi.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 BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const azureDevOpsApiRef = createApiRef<AzureDevOpsApi>({\n id: 'plugin.azure-devops.service',\n});\n\n/** @public */\nexport interface AzureDevOpsApi {\n getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }>;\n\n getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }>;\n\n getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }>;\n\n getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]>;\n\n getAllTeams(limit?: number): Promise<Team[]>;\n\n getUserTeamIds(userId: string): Promise<string[]>;\n\n getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }>;\n\n getReadme(opts: ReadmeConfig): Promise<Readme>;\n}\n"],"names":[],"mappings":";;AAiCO,MAAM,oBAAoB,YAA6B,CAAA;AAAA,EAC5D,EAAI,EAAA,6BAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"AzureDevOpsApi.esm.js","sources":["../../src/api/AzureDevOpsApi.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 BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const azureDevOpsApiRef = createApiRef<AzureDevOpsApi>({\n id: 'plugin.azure-devops.service',\n});\n\n/** @public */\nexport interface AzureDevOpsApi {\n getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }>;\n\n getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }>;\n\n getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }>;\n\n getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]>;\n\n getAllTeams(limit?: number): Promise<Team[]>;\n\n getUserTeamIds(userId: string): Promise<string[]>;\n\n getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }>;\n\n getReadme(opts: ReadmeConfig): Promise<Readme>;\n}\n"],"names":[],"mappings":";;AAiCO,MAAM,oBAAoB,YAA6B,CAAA;AAAA,EAC5D,EAAI,EAAA;AACN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AzureDevOpsClient.esm.js","sources":["../../src/api/AzureDevOpsClient.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 BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport { AzureDevOpsApi } from './AzureDevOpsApi';\n\n/** @public */\nexport class AzureDevOpsClient implements AzureDevOpsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n public constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n public async getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n const urlSegment = `repo-builds/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<RepoBuild[]>(urlSegment);\n return { items };\n }\n\n public async getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }> {\n const queryString = new URLSearchParams();\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `git-tags/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<GitTag[]>(urlSegment);\n return { items };\n }\n\n public async getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (options?.status) {\n queryString.append('status', options.status.toString());\n }\n if (options?.teamsLimit) {\n queryString.append('teamsLimit', options.teamsLimit.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `pull-requests/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<PullRequest[]>(urlSegment);\n return { items };\n }\n\n public getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]> {\n const queryString = new URLSearchParams();\n queryString.append('top', '100');\n if (teamsLimit) {\n queryString.append('teamsLimit', teamsLimit.toString());\n }\n const urlSegment = `dashboard-pull-requests/${projectName}?${queryString}`;\n return this.get<DashboardPullRequest[]>(urlSegment);\n }\n\n public getAllTeams(limit?: number): Promise<Team[]> {\n const queryString = new URLSearchParams();\n if (limit) {\n queryString.append('limit', limit.toString());\n }\n let urlSegment = 'all-teams';\n if (queryString.toString()) {\n urlSegment += `?${queryString}`;\n }\n return this.get<Team[]>(urlSegment);\n }\n\n public getUserTeamIds(userId: string): Promise<string[]> {\n return this.get<string[]>(`users/${userId}/team-ids`);\n }\n\n public async getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }> {\n const queryString = new URLSearchParams();\n queryString.append('entityRef', entityRef);\n if (repoName) {\n queryString.append('repoName', repoName);\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n if (definitionName) {\n const definitionNames = definitionName.split(',');\n if (definitionNames.length > 1) {\n const buildRuns: BuildRun[] = [];\n for (const name of definitionNames) {\n queryString.set('definitionName', name.trim());\n if (options?.top) {\n queryString.set('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n buildRuns.push(...items);\n }\n return { items: buildRuns };\n }\n queryString.append('definitionName', definitionName.trim());\n }\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n return { items };\n }\n\n public async getReadme(opts: ReadmeConfig): Promise<Readme> {\n const queryString = new URLSearchParams();\n if (opts.host) {\n queryString.append('host', opts.host);\n }\n if (opts.org) {\n queryString.append('org', opts.org);\n }\n if (opts.path) {\n queryString.append('path', opts.path);\n }\n queryString.append('entityRef', opts.entityRef);\n return await this.get(\n `readme/${encodeURIComponent(opts.project)}/${encodeURIComponent(\n opts.repo,\n )}?${queryString}`,\n );\n }\n\n private async get<T>(path: string): Promise<T> {\n const baseUrl = `${await this.discoveryApi.getBaseUrl('azure-devops')}/`;\n const url = new URL(path, baseUrl);\n\n const response = await this.fetchApi.fetch(url.toString());\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n}\n"],"names":["urlSegment","items"],"mappings":";;AAkCO,MAAM,iBAA4C,CAAA;AAAA,EACtC,YAAA,CAAA;AAAA,EACA,QAAA,CAAA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,OAAO,CAAC,CAAI,CAAA,EAAA,kBAAA;AAAA,QAC5C,IAAK,CAAA,IAAA;AAAA,OACN,IAAI,WAAW,CAAA,CAAA;AAAA,KAClB,CAAA;AAAA,GACF;AAAA,EAEA,MAAc,IAAO,IAA0B,EAAA;AAC7C,IAAA,MAAM,UAAU,CAAG,EAAA,MAAM,KAAK,YAAa,CAAA,UAAA,CAAW,cAAc,CAAC,CAAA,CAAA,CAAA,CAAA;AACrE,IAAA,MAAM,GAAM,GAAA,IAAI,GAAI,CAAA,IAAA,EAAM,OAAO,CAAA,CAAA;AAEjC,IAAA,MAAM,WAAW,MAAM,IAAA,CAAK,SAAS,KAAM,CAAA,GAAA,CAAI,UAAU,CAAA,CAAA;AAEzD,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,MAAM,aAAc,CAAA,YAAA,CAAa,QAAQ,CAAA,CAAA;AAAA,KACjD;AAEA,IAAA,OAAO,SAAS,IAAK,EAAA,CAAA;AAAA,GACvB;AACF;;;;"}
1
+ {"version":3,"file":"AzureDevOpsClient.esm.js","sources":["../../src/api/AzureDevOpsClient.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 BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport { AzureDevOpsApi } from './AzureDevOpsApi';\n\n/** @public */\nexport class AzureDevOpsClient implements AzureDevOpsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n public constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n public async getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n const urlSegment = `repo-builds/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<RepoBuild[]>(urlSegment);\n return { items };\n }\n\n public async getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }> {\n const queryString = new URLSearchParams();\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `git-tags/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<GitTag[]>(urlSegment);\n return { items };\n }\n\n public async getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (options?.status) {\n queryString.append('status', options.status.toString());\n }\n if (options?.teamsLimit) {\n queryString.append('teamsLimit', options.teamsLimit.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `pull-requests/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<PullRequest[]>(urlSegment);\n return { items };\n }\n\n public getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]> {\n const queryString = new URLSearchParams();\n queryString.append('top', '100');\n if (teamsLimit) {\n queryString.append('teamsLimit', teamsLimit.toString());\n }\n const urlSegment = `dashboard-pull-requests/${projectName}?${queryString}`;\n return this.get<DashboardPullRequest[]>(urlSegment);\n }\n\n public getAllTeams(limit?: number): Promise<Team[]> {\n const queryString = new URLSearchParams();\n if (limit) {\n queryString.append('limit', limit.toString());\n }\n let urlSegment = 'all-teams';\n if (queryString.toString()) {\n urlSegment += `?${queryString}`;\n }\n return this.get<Team[]>(urlSegment);\n }\n\n public getUserTeamIds(userId: string): Promise<string[]> {\n return this.get<string[]>(`users/${userId}/team-ids`);\n }\n\n public async getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }> {\n const queryString = new URLSearchParams();\n queryString.append('entityRef', entityRef);\n if (repoName) {\n queryString.append('repoName', repoName);\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n if (definitionName) {\n const definitionNames = definitionName.split(',');\n if (definitionNames.length > 1) {\n const buildRuns: BuildRun[] = [];\n for (const name of definitionNames) {\n queryString.set('definitionName', name.trim());\n if (options?.top) {\n queryString.set('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n buildRuns.push(...items);\n }\n return { items: buildRuns };\n }\n queryString.append('definitionName', definitionName.trim());\n }\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n return { items };\n }\n\n public async getReadme(opts: ReadmeConfig): Promise<Readme> {\n const queryString = new URLSearchParams();\n if (opts.host) {\n queryString.append('host', opts.host);\n }\n if (opts.org) {\n queryString.append('org', opts.org);\n }\n if (opts.path) {\n queryString.append('path', opts.path);\n }\n queryString.append('entityRef', opts.entityRef);\n return await this.get(\n `readme/${encodeURIComponent(opts.project)}/${encodeURIComponent(\n opts.repo,\n )}?${queryString}`,\n );\n }\n\n private async get<T>(path: string): Promise<T> {\n const baseUrl = `${await this.discoveryApi.getBaseUrl('azure-devops')}/`;\n const url = new URL(path, baseUrl);\n\n const response = await this.fetchApi.fetch(url.toString());\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n}\n"],"names":["urlSegment","items"],"mappings":";;AAkCO,MAAM,iBAA4C,CAAA;AAAA,EACtC,YAAA;AAAA,EACA,QAAA;AAAA,EAEV,YAAY,OAGhB,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA;AAAA;AAC1B,EAEA,MAAa,aACX,CAAA,WAAA,EACA,QACA,EAAA,IAAA,EACA,KACA,OACiC,EAAA;AACjC,IAAM,MAAA,WAAA,GAAc,IAAI,eAAgB,EAAA;AACxC,IAAA,IAAI,SAAS,GAAK,EAAA;AAChB,MAAA,WAAA,CAAY,MAAO,CAAA,KAAA,EAAO,OAAQ,CAAA,GAAA,CAAI,UAAU,CAAA;AAAA;AAElD,IAAA,IAAI,IAAM,EAAA;AACR,MAAY,WAAA,CAAA,MAAA,CAAO,QAAQ,IAAI,CAAA;AAAA;AAEjC,IAAA,IAAI,GAAK,EAAA;AACP,MAAY,WAAA,CAAA,MAAA,CAAO,OAAO,GAAG,CAAA;AAAA;AAE/B,IAAA,MAAM,aAAa,CAAe,YAAA,EAAA,kBAAA;AAAA,MAChC;AAAA,KACD,CAAI,CAAA,EAAA,kBAAA,CAAmB,QAAQ,CAAC,IAAI,WAAW,CAAA,CAAA;AAE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kBAAA;AAAA,QAC5C,IAAK,CAAA;AAAA,OACN,IAAI,WAAW,CAAA;AAAA,KAClB;AAAA;AACF,EAEA,MAAc,IAAO,IAA0B,EAAA;AAC7C,IAAA,MAAM,UAAU,CAAG,EAAA,MAAM,KAAK,YAAa,CAAA,UAAA,CAAW,cAAc,CAAC,CAAA,CAAA,CAAA;AACrE,IAAA,MAAM,GAAM,GAAA,IAAI,GAAI,CAAA,IAAA,EAAM,OAAO,CAAA;AAEjC,IAAA,MAAM,WAAW,MAAM,IAAA,CAAK,SAAS,KAAM,CAAA,GAAA,CAAI,UAAU,CAAA;AAEzD,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,MAAM,aAAc,CAAA,YAAA,CAAa,QAAQ,CAAA;AAAA;AAGjD,IAAA,OAAO,SAAS,IAAK,EAAA;AAAA;AAEzB;;;;"}
@@ -1,4 +1,4 @@
1
- import SvgIcon from '@mui/material/SvgIcon';
1
+ import SvgIcon from '@material-ui/core/SvgIcon';
2
2
  import React from 'react';
3
3
 
4
4
  const AzureGitTagsIcon = (props) => /* @__PURE__ */ React.createElement(SvgIcon, { ...props, viewBox: "0 0 32 32" }, /* @__PURE__ */ React.createElement("path", { d: "M22.5 12C23.8807 12 25 10.8807 25 9.5C25 8.11929 23.8807 7 22.5 7C21.1193 7 20 8.11929 20 9.5C20 10.8807 21.1193 12 22.5 12ZM18.6842 3C17.6695 3 16.6927 3.38568 15.9516 4.07892L3.77041 15.4742C2.01578 17.1157 1.96966 19.8841 3.66863 21.5831L9.99455 27.909C11.6543 29.5687 14.3452 29.5687 16.005 27.909L27.8282 16.0858C28.5783 15.3356 28.9998 14.3182 28.9998 13.2574V6.5C28.9998 4.567 27.4328 3 25.4998 3H18.6842ZM17.3179 5.53946C17.6884 5.19284 18.1769 5 18.6842 5H25.4998C26.3282 5 26.9998 5.67157 26.9998 6.5V13.2574C26.9998 13.7878 26.789 14.2965 26.414 14.6716L14.5907 26.4948C13.7121 27.3735 12.2874 27.3735 11.4088 26.4948L5.08284 20.1689C4.18339 19.2694 4.20781 17.8038 5.13673 16.9348L17.3179 5.53946Z" }));
@@ -1 +1 @@
1
- {"version":3,"file":"AzureGitTagsIcon.esm.js","sources":["../../../src/components/AzureGitTagsIcon/AzureGitTagsIcon.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 */\n\nimport SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';\n\nimport React from 'react';\n\n// From https://github.com/microsoft/fluentui-system-icons/blob/30a3e3c458883a1d63a43a951407f30e6b32b60c/assets/Tag/SVG/ic_fluent_tag_32_regular.svg\nexport const AzureGitTagsIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 32 32\">\n <path d=\"M22.5 12C23.8807 12 25 10.8807 25 9.5C25 8.11929 23.8807 7 22.5 7C21.1193 7 20 8.11929 20 9.5C20 10.8807 21.1193 12 22.5 12ZM18.6842 3C17.6695 3 16.6927 3.38568 15.9516 4.07892L3.77041 15.4742C2.01578 17.1157 1.96966 19.8841 3.66863 21.5831L9.99455 27.909C11.6543 29.5687 14.3452 29.5687 16.005 27.909L27.8282 16.0858C28.5783 15.3356 28.9998 14.3182 28.9998 13.2574V6.5C28.9998 4.567 27.4328 3 25.4998 3H18.6842ZM17.3179 5.53946C17.6884 5.19284 18.1769 5 18.6842 5H25.4998C26.3282 5 26.9998 5.67157 26.9998 6.5V13.2574C26.9998 13.7878 26.789 14.2965 26.414 14.6716L14.5907 26.4948C13.7121 27.3735 12.2874 27.3735 11.4088 26.4948L5.08284 20.1689C4.18339 19.2694 4.20781 17.8038 5.13673 16.9348L17.3179 5.53946Z\" />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAqBO,MAAM,gBAAmB,GAAA,CAAC,KAC/B,qBAAA,KAAA,CAAA,aAAA,CAAC,OAAS,EAAA,EAAA,GAAG,KAAO,EAAA,OAAA,EAAQ,WAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,MAAK,EAAA,EAAA,CAAA,EAAE,ysBAAwsB,CACltB;;;;"}
1
+ {"version":3,"file":"AzureGitTagsIcon.esm.js","sources":["../../../src/components/AzureGitTagsIcon/AzureGitTagsIcon.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 */\n\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nimport React from 'react';\n\n// From https://github.com/microsoft/fluentui-system-icons/blob/30a3e3c458883a1d63a43a951407f30e6b32b60c/assets/Tag/SVG/ic_fluent_tag_32_regular.svg\nexport const AzureGitTagsIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 32 32\">\n <path d=\"M22.5 12C23.8807 12 25 10.8807 25 9.5C25 8.11929 23.8807 7 22.5 7C21.1193 7 20 8.11929 20 9.5C20 10.8807 21.1193 12 22.5 12ZM18.6842 3C17.6695 3 16.6927 3.38568 15.9516 4.07892L3.77041 15.4742C2.01578 17.1157 1.96966 19.8841 3.66863 21.5831L9.99455 27.909C11.6543 29.5687 14.3452 29.5687 16.005 27.909L27.8282 16.0858C28.5783 15.3356 28.9998 14.3182 28.9998 13.2574V6.5C28.9998 4.567 27.4328 3 25.4998 3H18.6842ZM17.3179 5.53946C17.6884 5.19284 18.1769 5 18.6842 5H25.4998C26.3282 5 26.9998 5.67157 26.9998 6.5V13.2574C26.9998 13.7878 26.789 14.2965 26.414 14.6716L14.5907 26.4948C13.7121 27.3735 12.2874 27.3735 11.4088 26.4948L5.08284 20.1689C4.18339 19.2694 4.20781 17.8038 5.13673 16.9348L17.3179 5.53946Z\" />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAqBO,MAAM,gBAAmB,GAAA,CAAC,KAC/B,qBAAA,KAAA,CAAA,aAAA,CAAC,OAAS,EAAA,EAAA,GAAG,KAAO,EAAA,OAAA,EAAQ,WAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,MAAK,EAAA,EAAA,CAAA,EAAE,ysBAAwsB,CACltB;;;;"}
@@ -1,4 +1,4 @@
1
- import SvgIcon from '@mui/material/SvgIcon';
1
+ import SvgIcon from '@material-ui/core/SvgIcon';
2
2
  import React from 'react';
3
3
 
4
4
  const AzurePipelinesIcon = (props) => /* @__PURE__ */ React.createElement(SvgIcon, { ...props, viewBox: "0 0 512 512" }, /* @__PURE__ */ React.createElement(
@@ -1 +1 @@
1
- {"version":3,"file":"AzurePipelinesIcon.esm.js","sources":["../../../src/components/AzurePipelinesIcon/AzurePipelinesIcon.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 */\n\nimport SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';\n\nimport React from 'react';\n\nexport const AzurePipelinesIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M461.81 53.81a4.4 4.4 0 00-3.3-3.39c-54.38-13.3-180 34.09-248.13 102.17a294.9 294.9 0 00-33.09 39.08c-21-1.9-42-.3-59.88 7.5-50.49 22.2-65.18 80.18-69.28 105.07a9 9 0 009.8 10.4l81.07-8.9a180.29 180.29 0 001.1 18.3 18.15 18.15 0 005.3 11.09l31.39 31.39a18.15 18.15 0 0011.1 5.3 179.91 179.91 0 0018.19 1.1l-8.89 81a9 9 0 0010.39 9.79c24.9-4 83-18.69 105.07-69.17 7.8-17.9 9.4-38.79 7.6-59.69a293.91 293.91 0 0039.19-33.09c68.38-68 115.47-190.86 102.37-247.95zM298.66 213.67a42.7 42.7 0 1160.38 0 42.65 42.65 0 01-60.38 0z\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M109.64 352a45.06 45.06 0 00-26.35 12.84C65.67 382.52 64 448 64 448s65.52-1.67 83.15-19.31A44.73 44.73 0 00160 402.32\"\n />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAoBa,MAAA,kBAAA,GAAqB,CAAC,KACjC,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,SAAQ,aAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA,2gBAAA;AAAA,GAAA;AACJ,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA,uHAAA;AAAA,GAAA;AACJ,CACF;;;;"}
1
+ {"version":3,"file":"AzurePipelinesIcon.esm.js","sources":["../../../src/components/AzurePipelinesIcon/AzurePipelinesIcon.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 */\n\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nimport React from 'react';\n\nexport const AzurePipelinesIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M461.81 53.81a4.4 4.4 0 00-3.3-3.39c-54.38-13.3-180 34.09-248.13 102.17a294.9 294.9 0 00-33.09 39.08c-21-1.9-42-.3-59.88 7.5-50.49 22.2-65.18 80.18-69.28 105.07a9 9 0 009.8 10.4l81.07-8.9a180.29 180.29 0 001.1 18.3 18.15 18.15 0 005.3 11.09l31.39 31.39a18.15 18.15 0 0011.1 5.3 179.91 179.91 0 0018.19 1.1l-8.89 81a9 9 0 0010.39 9.79c24.9-4 83-18.69 105.07-69.17 7.8-17.9 9.4-38.79 7.6-59.69a293.91 293.91 0 0039.19-33.09c68.38-68 115.47-190.86 102.37-247.95zM298.66 213.67a42.7 42.7 0 1160.38 0 42.65 42.65 0 01-60.38 0z\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M109.64 352a45.06 45.06 0 00-26.35 12.84C65.67 382.52 64 448 64 448s65.52-1.67 83.15-19.31A44.73 44.73 0 00160 402.32\"\n />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAoBa,MAAA,kBAAA,GAAqB,CAAC,KACjC,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,SAAQ,aAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA;AAAA;AACJ,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA;AAAA;AACJ,CACF;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import SvgIcon from '@mui/material/SvgIcon';
2
+ import SvgIcon from '@material-ui/core/SvgIcon';
3
3
 
4
4
  const AzurePullRequestsIcon = (props) => /* @__PURE__ */ React.createElement(SvgIcon, { ...props, viewBox: "0 0 512 512" }, /* @__PURE__ */ React.createElement(
5
5
  "circle",
@@ -1 +1 @@
1
- {"version":3,"file":"AzurePullRequestsIcon.esm.js","sources":["../../../src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.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 */\n\nimport React from 'react';\nimport SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';\n\n/** @public */\nexport const AzurePullRequestsIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M128 144v224M288 160l-64-64 64-64\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"96\"\n r=\"48\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"384\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M240 96h84a60 60 0 0160 60v212\"\n />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAoBa,MAAA,qBAAA,GAAwB,CAAC,KACpC,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,SAAQ,aAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,QAAA;AAAA,EAAA;AAAA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cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA,gCAAA;AAAA,GAAA;AACJ,CACF;;;;"}
1
+ {"version":3,"file":"AzurePullRequestsIcon.esm.js","sources":["../../../src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.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 */\n\nimport React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\n/** @public */\nexport const AzurePullRequestsIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M128 144v224M288 160l-64-64 64-64\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"96\"\n r=\"48\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"384\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=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OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,EAAG,EAAA,KAAA;AAAA,IACH,EAAG,EAAA,KAAA;AAAA,IACH,CAAE,EAAA;AAAA;AACJ,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA;AAAA;AACJ,CACF;;;;"}
@@ -1,5 +1,5 @@
1
- import Box from '@mui/material/Box';
2
- import Typography from '@mui/material/Typography';
1
+ import Box from '@material-ui/core/Box';
2
+ import Typography from '@material-ui/core/Typography';
3
3
  import { BuildStatus, BuildResult } from '@backstage-community/plugin-azure-devops-common';
4
4
  import { ResponseErrorPanel, Table, Link, StatusWarning, StatusAborted, StatusPending, StatusRunning, StatusError, StatusOK } from '@backstage/core-components';
5
5
  import { AzurePipelinesIcon } from '../AzurePipelinesIcon/AzurePipelinesIcon.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"BuildTable.esm.js","sources":["../../../src/components/BuildTable/BuildTable.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 */\n\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport {\n BuildResult,\n BuildRun,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport {\n Link,\n ResponseErrorPanel,\n StatusAborted,\n StatusError,\n StatusOK,\n StatusPending,\n StatusRunning,\n StatusWarning,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { AzurePipelinesIcon } from '../AzurePipelinesIcon';\nimport { DateTime } from 'luxon';\nimport React from 'react';\nimport { getDurationFromDates } from '../../utils/getDurationFromDates';\n\nexport const getBuildResultComponent = (result: number | undefined) => {\n switch (result) {\n case BuildResult.Succeeded:\n return (\n <Typography component=\"span\">\n <StatusOK /> Succeeded\n </Typography>\n );\n case BuildResult.PartiallySucceeded:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Partially Succeeded\n </Typography>\n );\n case BuildResult.Failed:\n return (\n <Typography component=\"span\">\n <StatusError /> Failed\n </Typography>\n );\n case BuildResult.Canceled:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Canceled\n </Typography>\n );\n case BuildResult.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nexport const getBuildStateComponent = (\n status: number | undefined,\n result: number | undefined,\n) => {\n switch (status) {\n case BuildStatus.InProgress:\n return (\n <Typography component=\"span\">\n <StatusRunning /> In Progress\n </Typography>\n );\n case BuildStatus.Completed:\n return getBuildResultComponent(result);\n case BuildStatus.Cancelling:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Cancelling\n </Typography>\n );\n case BuildStatus.Postponed:\n return (\n <Typography component=\"span\">\n <StatusPending /> Postponed\n </Typography>\n );\n case BuildStatus.NotStarted:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Not Started\n </Typography>\n );\n case BuildStatus.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'id',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Build',\n field: 'title',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Link to={row.link || ''}>{row.title}</Link>\n ),\n },\n {\n title: 'Source',\n field: 'source',\n width: 'auto',\n },\n {\n title: 'State',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"button\">\n {getBuildStateComponent(row.status, row.result)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Duration',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography>\n {getDurationFromDates(row.startTime, row.finishTime)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Age',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) =>\n (row.queueTime\n ? DateTime.fromISO(row.queueTime)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype BuildTableProps = {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n};\n\nexport const BuildTable = ({ items, loading, error }: BuildTableProps) => {\n if (error) {\n return (\n <div>\n <ResponseErrorPanel error={error} />\n </div>\n );\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePipelinesIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Pipelines - Builds ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyCa,MAAA,uBAAA,GAA0B,CAAC,MAA+B,KAAA;AACrE,EAAA,QAAQ,MAAQ;AAAA,IACd,KAAK,WAAY,CAAA,SAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAS,GAAE,YACd,CAAA,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,kBAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAc,GAAE,sBACnB,CAAA,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KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,4BAAA,EACa,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACtD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS,EAAC;AAAA,KAAA;AAAA,GAClB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"BuildTable.esm.js","sources":["../../../src/components/BuildTable/BuildTable.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 */\n\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport {\n BuildResult,\n BuildRun,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport {\n Link,\n ResponseErrorPanel,\n StatusAborted,\n StatusError,\n StatusOK,\n StatusPending,\n StatusRunning,\n StatusWarning,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { AzurePipelinesIcon } from '../AzurePipelinesIcon';\nimport { DateTime } from 'luxon';\nimport React from 'react';\nimport { getDurationFromDates } from '../../utils/getDurationFromDates';\n\nexport const getBuildResultComponent = (result: number | undefined) => {\n switch (result) {\n case BuildResult.Succeeded:\n return (\n <Typography component=\"span\">\n <StatusOK /> Succeeded\n </Typography>\n );\n case BuildResult.PartiallySucceeded:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Partially Succeeded\n </Typography>\n );\n case BuildResult.Failed:\n return (\n <Typography component=\"span\">\n <StatusError /> Failed\n </Typography>\n );\n case BuildResult.Canceled:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Canceled\n </Typography>\n );\n case BuildResult.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nexport const getBuildStateComponent = (\n status: number | undefined,\n result: number | undefined,\n) => {\n switch (status) {\n case BuildStatus.InProgress:\n return (\n <Typography component=\"span\">\n <StatusRunning /> In Progress\n </Typography>\n );\n case BuildStatus.Completed:\n return getBuildResultComponent(result);\n case BuildStatus.Cancelling:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Cancelling\n </Typography>\n );\n case BuildStatus.Postponed:\n return (\n <Typography component=\"span\">\n <StatusPending /> Postponed\n </Typography>\n );\n case BuildStatus.NotStarted:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Not Started\n </Typography>\n );\n case BuildStatus.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'id',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Build',\n field: 'title',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Link to={row.link || ''}>{row.title}</Link>\n ),\n },\n {\n title: 'Source',\n field: 'source',\n width: 'auto',\n },\n {\n title: 'State',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"button\">\n {getBuildStateComponent(row.status, row.result)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Duration',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography>\n {getDurationFromDates(row.startTime, row.finishTime)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Age',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) =>\n (row.queueTime\n ? DateTime.fromISO(row.queueTime)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype BuildTableProps = {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n};\n\nexport const BuildTable = ({ items, loading, error }: BuildTableProps) => {\n if (error) {\n return (\n <div>\n <ResponseErrorPanel error={error} />\n </div>\n );\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePipelinesIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Pipelines - Builds ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyCa,MAAA,uBAAA,GAA0B,CAAC,MAA+B,KAAA;AACrE,EAAA,QAAQ,MAAQ;AAAA,IACd,KAAK,WAAY,CAAA,SAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAS,GAAE,YACd,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,kBAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAc,GAAE,sBACnB,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,MAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,IAAY,GAAE,SACjB,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,QAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAc,GAAE,WACnB,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,IAAA;AAAA,IACjB;AACE,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAc,GAAE,UACnB,CAAA;AAAA;AAGR;AAEa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AAA,aAAA,CAAA,KAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA,EAAmB,OAAc,CACpC,CAAA;AAAA;AAIJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,OAAA;AAAA,MACX,OAAA;AAAA,MACA,OAAS,EAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,QACR,MAAQ,EAAA,IAAA;AAAA,QACR,QAAU,EAAA,CAAA;AAAA,QACV,4BAA4B,CAAC;AAAA,OAC/B;AAAA,MACA,KAAA,kBACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,OAAQ,EAAA,MAAA,EAAO,YAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,kBAAmB,EAAA,EAAA,KAAA,EAAO,EAAE,QAAA,EAAU,IAAM,EAAA,CAAA,kBAC5C,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,4BAAA,EACa,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACtD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS;AAAC;AAAA,GAClB;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzureGitTags.esm.js","sources":["../../../src/components/EntityPageAzureGitTags/EntityPageAzureGitTags.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 */\n\nimport { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { GitTagTable } from '../GitTagTable/GitTagTable';\nimport React from 'react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzureGitTags = () => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsGitTagReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <GitTagTable />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,yBAAyB,MAAM;AAC1C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,+BAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,wCAEV,WAAY,EAAA,IAAA,CAAA;AAAA,GACf,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzureGitTags.esm.js","sources":["../../../src/components/EntityPageAzureGitTags/EntityPageAzureGitTags.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 */\n\nimport { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { GitTagTable } from '../GitTagTable/GitTagTable';\nimport React from 'react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzureGitTags = () => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsGitTagReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <GitTagTable />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,yBAAyB,MAAM;AAC1C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,+BAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,wCAEV,WAAY,EAAA,IAAA;AAAA,GACf;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzurePipelines.esm.js","sources":["../../../src/components/EntityPageAzurePipelines/EntityPageAzurePipelines.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 */\n\nimport { BuildTable } from '../BuildTable/BuildTable';\nimport React from 'react';\nimport { useBuildRuns } from '../../hooks';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);\n\n return (\n <RequirePermission\n permission={azureDevOpsPipelineReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <BuildTable items={items} loading={loading} error={error} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBa,MAAA,wBAAA,GAA2B,CAAC,KAAqC,KAAA;AAC5E,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAE7B,EAAM,MAAA,EAAE,OAAO,OAAS,EAAA,KAAA,KAAU,YAAa,CAAA,MAAA,EAAQ,MAAM,YAAY,CAAA,CAAA;AAEzE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,iCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,OAAA,EAAkB,KAAc,EAAA,CAAA;AAAA,GAC5D,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzurePipelines.esm.js","sources":["../../../src/components/EntityPageAzurePipelines/EntityPageAzurePipelines.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 */\n\nimport { BuildTable } from '../BuildTable/BuildTable';\nimport React from 'react';\nimport { useBuildRuns } from '../../hooks';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);\n\n return (\n <RequirePermission\n permission={azureDevOpsPipelineReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <BuildTable items={items} loading={loading} error={error} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBa,MAAA,wBAAA,GAA2B,CAAC,KAAqC,KAAA;AAC5E,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAE7B,EAAM,MAAA,EAAE,OAAO,OAAS,EAAA,KAAA,KAAU,YAAa,CAAA,MAAA,EAAQ,MAAM,YAAY,CAAA;AAEzE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,iCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,OAAA,EAAkB,KAAc,EAAA;AAAA,GAC5D;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzurePullRequests.esm.js","sources":["../../../src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.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 */\n\nimport { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestTable } from '../PullRequestTable/PullRequestTable';\nimport React from 'react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport const EntityPageAzurePullRequests = (props: {\n defaultLimit?: number;\n}) => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsPullRequestReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <PullRequestTable defaultLimit={props.defaultLimit} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBa,MAAA,2BAAA,GAA8B,CAAC,KAEtC,KAAA;AACJ,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,oCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,CAAM,YAAc,EAAA,CAAA;AAAA,GACtD,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzurePullRequests.esm.js","sources":["../../../src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.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 */\n\nimport { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestTable } from '../PullRequestTable/PullRequestTable';\nimport React from 'react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport const EntityPageAzurePullRequests = (props: {\n defaultLimit?: number;\n}) => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsPullRequestReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <PullRequestTable defaultLimit={props.defaultLimit} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBa,MAAA,2BAAA,GAA8B,CAAC,KAEtC,KAAA;AACJ,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,oCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,CAAM,YAAc,EAAA;AAAA,GACtD;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import Box from '@mui/material/Box';
1
+ import Box from '@material-ui/core/Box';
2
2
  import { ResponseErrorPanel, Table, Link } from '@backstage/core-components';
3
3
  import React from 'react';
4
4
  import { AzureGitTagsIcon } from '../AzureGitTagsIcon/AzureGitTagsIcon.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"GitTagTable.esm.js","sources":["../../../src/components/GitTagTable/GitTagTable.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 */\n\nimport Box from '@mui/material/Box';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nimport { AzureGitTagsIcon } from '../AzureGitTagsIcon';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useGitTags } from '../../hooks/useGitTags';\n\nconst columns: TableColumn[] = [\n {\n title: 'Tag',\n field: 'name',\n highlight: false,\n defaultSort: 'desc',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.name}</Link>\n </Box>\n ),\n },\n {\n title: 'Commit',\n field: 'peeledObjectId',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.commitLink ?? ''}>{row.peeledObjectId}</Link>\n </Box>\n ),\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n];\n\nexport const GitTagTable = () => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useGitTags(entity);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzureGitTagsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Git Tags ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,O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AA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,OAAA;AAAA,MACX,OAAA;AAAA,MACA,OAAS,EAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,QACR,MAAQ,EAAA,IAAA;AAAA,QACR,QAAU,EAAA,CAAA;AAAA,QACV,4BAA4B,CAAC,OAAA;AAAA,OAC/B;AAAA,MACA,KAAA,kBACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,OAAQ,EAAA,MAAA,EAAO,YAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,EAAA,KAAA,EAAO,EAAE,QAAA,EAAU,IAAM,EAAA,CAAA,kBAC1C,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,0BAAA,EACW,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACpD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS,EAAC;AAAA,KAAA;AAAA,GAClB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GitTagTable.esm.js","sources":["../../../src/components/GitTagTable/GitTagTable.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 */\n\nimport Box from '@material-ui/core/Box';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nimport { AzureGitTagsIcon } from '../AzureGitTagsIcon';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useGitTags } from '../../hooks/useGitTags';\n\nconst columns: TableColumn[] = [\n {\n title: 'Tag',\n field: 'name',\n highlight: false,\n defaultSort: 'desc',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.name}</Link>\n </Box>\n ),\n },\n {\n title: 'Commit',\n field: 'peeledObjectId',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.commitLink ?? ''}>{row.peeledObjectId}</Link>\n </Box>\n ),\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n];\n\nexport const GitTagTable = () => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useGitTags(entity);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzureGitTagsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Git Tags ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,KAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,WAAa,EAAA,MAAA;AAAA,IACb,KAAO,EAAA,MAAA;AAAA,IACP,QAAQ,CAAC,GAAA,qBACN,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,SAAQ,MAAO,EAAA,UAAA,EAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,GAAA,CAAI,QAAQ,EAAK,EAAA,EAAA,GAAA,CAAI,IAAK,CACtC;AAAA,GAEJ;AAA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EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,0BAAA,EACW,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACpD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS;AAAC;AAAA,GAClB;AAEJ;;;;"}
@@ -1,5 +1,5 @@
1
- import Button from '@mui/material/Button';
2
- import ButtonGroup from '@mui/material/ButtonGroup';
1
+ import Button from '@material-ui/core/Button';
2
+ import ButtonGroup from '@material-ui/core/ButtonGroup';
3
3
  import { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';
4
4
  import React from 'react';
5
5
 
@@ -10,7 +10,7 @@ const PullRequestStatusButtonGroup = ({
10
10
  return /* @__PURE__ */ React.createElement(ButtonGroup, { "aria-label": "outlined button group" }, /* @__PURE__ */ React.createElement(
11
11
  Button,
12
12
  {
13
- color: status === PullRequestStatus.Active ? "secondary" : "primary",
13
+ color: status === PullRequestStatus.Active ? "primary" : "default",
14
14
  onClick: () => {
15
15
  setStatus(PullRequestStatus.Active);
16
16
  }
@@ -19,7 +19,7 @@ const PullRequestStatusButtonGroup = ({
19
19
  ), /* @__PURE__ */ React.createElement(
20
20
  Button,
21
21
  {
22
- color: status === PullRequestStatus.Completed ? "secondary" : "primary",
22
+ color: status === PullRequestStatus.Completed ? "primary" : "default",
23
23
  onClick: () => {
24
24
  setStatus(PullRequestStatus.Completed);
25
25
  }
@@ -28,7 +28,7 @@ const PullRequestStatusButtonGroup = ({
28
28
  ), /* @__PURE__ */ React.createElement(
29
29
  Button,
30
30
  {
31
- color: status === PullRequestStatus.Abandoned ? "secondary" : "primary",
31
+ color: status === PullRequestStatus.Abandoned ? "primary" : "default",
32
32
  onClick: () => {
33
33
  setStatus(PullRequestStatus.Abandoned);
34
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestStatusButtonGroup.esm.js","sources":["../../../src/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.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 */\n\nimport Button from '@mui/material/Button';\nimport ButtonGroup from '@mui/material/ButtonGroup';\n\nimport { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nexport const PullRequestStatusButtonGroup = ({\n status,\n setStatus,\n}: {\n status: PullRequestStatus;\n setStatus: (pullRequestStatus: PullRequestStatus) => void;\n}) => {\n return (\n <ButtonGroup aria-label=\"outlined button group\">\n <Button\n color={status === PullRequestStatus.Active ? 'secondary' : 'primary'}\n onClick={() => {\n setStatus(PullRequestStatus.Active);\n }}\n >\n Active\n </Button>\n <Button\n color={status === PullRequestStatus.Completed ? 'secondary' : 'primary'}\n onClick={() => {\n setStatus(PullRequestStatus.Completed);\n }}\n >\n Completed\n </Button>\n <Button\n color={status === PullRequestStatus.Abandoned ? 'secondary' : 'primary'}\n onClick={() => {\n setStatus(PullRequestStatus.Abandoned);\n }}\n >\n Abandoned\n </Button>\n </ButtonGroup>\n );\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,+BAA+B,CAAC;AAAA,EAC3C,MAAA;AAAA,EACA,SAAA;AACF,CAGM,KAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,WAAY,EAAA,EAAA,YAAA,EAAW,uBACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,MAAA,GAAS,WAAc,GAAA,SAAA;AAAA,MAC3D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,MAAM,CAAA,CAAA;AAAA,OACpC;AAAA,KAAA;AAAA,IACD,QAAA;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,WAAc,GAAA,SAAA;AAAA,MAC9D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA,CAAA;AAAA,OACvC;AAAA,KAAA;AAAA,IACD,WAAA;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,WAAc,GAAA,SAAA;AAAA,MAC9D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA,CAAA;AAAA,OACvC;AAAA,KAAA;AAAA,IACD,WAAA;AAAA,GAGH,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestStatusButtonGroup.esm.js","sources":["../../../src/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.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 */\n\nimport Button from '@material-ui/core/Button';\nimport ButtonGroup from '@material-ui/core/ButtonGroup';\n\nimport { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nexport const PullRequestStatusButtonGroup = ({\n status,\n setStatus,\n}: {\n status: PullRequestStatus;\n setStatus: (pullRequestStatus: PullRequestStatus) => void;\n}) => {\n return (\n <ButtonGroup aria-label=\"outlined button group\">\n <Button\n color={status === PullRequestStatus.Active ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Active);\n }}\n >\n Active\n </Button>\n <Button\n color={status === PullRequestStatus.Completed ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Completed);\n }}\n >\n Completed\n </Button>\n <Button\n color={status === PullRequestStatus.Abandoned ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Abandoned);\n }}\n >\n Abandoned\n </Button>\n </ButtonGroup>\n );\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,+BAA+B,CAAC;AAAA,EAC3C,MAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,WAAY,EAAA,EAAA,YAAA,EAAW,uBACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,MAAA,GAAS,SAAY,GAAA,SAAA;AAAA,MACzD,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,MAAM,CAAA;AAAA;AACpC,KAAA;AAAA,IACD;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,SAAY,GAAA,SAAA;AAAA,MAC5D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA;AAAA;AACvC,KAAA;AAAA,IACD;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,SAAY,GAAA,SAAA;AAAA,MAC5D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA;AAAA;AACvC,KAAA;AAAA,IACD;AAAA,GAGH,CAAA;AAEJ;;;;"}
@@ -1,5 +1,5 @@
1
- import Box from '@mui/material/Box';
2
- import Chip from '@mui/material/Chip';
1
+ import Box from '@material-ui/core/Box';
2
+ import Chip from '@material-ui/core/Chip';
3
3
  import { ResponseErrorPanel, Table, Link } from '@backstage/core-components';
4
4
  import { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';
5
5
  import React, { useState } from 'react';
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestTable.esm.js","sources":["../../../src/components/PullRequestTable/PullRequestTable.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 */\n\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport {\n PullRequest,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport React, { useState } from 'react';\n\nimport { AzurePullRequestsIcon } from '../AzurePullRequestsIcon';\nimport { DateTime } from 'luxon';\nimport { PullRequestStatusButtonGroup } from '../PullRequestStatusButtonGroup';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { usePullRequests } from '../../hooks/usePullRequests';\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'pullRequestId',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Title',\n field: 'title',\n width: 'auto',\n render: (row: Partial<PullRequest>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.title}</Link>\n {row.isDraft && (\n <Box paddingLeft={1}>\n <Chip\n label=\"Draft\"\n variant=\"outlined\"\n color=\"secondary\"\n size=\"small\"\n />\n </Box>\n )}\n </Box>\n ),\n },\n {\n title: 'Source',\n field: 'sourceRefName',\n width: 'auto',\n },\n {\n title: 'Target',\n field: 'targetRefName',\n width: 'auto',\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n {\n title: 'Created',\n field: 'creationDate',\n width: 'auto',\n render: (row: Partial<PullRequest>) =>\n (row.creationDate\n ? DateTime.fromISO(row.creationDate)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype PullRequestTableProps = {\n defaultLimit?: number;\n};\n\nexport const PullRequestTable = ({ defaultLimit }: PullRequestTableProps) => {\n const [pullRequestStatusState, setPullRequestStatusState] =\n useState<PullRequestStatus>(PullRequestStatus.Active);\n const { entity } = useEntity();\n\n const { items, loading, error } = usePullRequests(\n entity,\n defaultLimit,\n pullRequestStatusState,\n );\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePullRequestsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Pull Requests ({items ? items.length : 0})\n <Box position=\"absolute\" right={320} top={20}>\n <PullRequestStatusButtonGroup\n status={pullRequestStatusState}\n setStatus={setPullRequestStatusState}\n />\n </Box>\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoCA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,IAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,KAAO,EAAA,MAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,OAAA;AAAA,IACP,KAA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AAAA,QAAA;AAAA,UACC,MAAQ,EAAA,sBAAA;AAAA,UACR,SAAW,EAAA,yBAAA;AAAA,SAAA;AAAA,OAEf,CACF,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS,EAAC;AAAA,KAAA;AAAA,GAClB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestTable.esm.js","sources":["../../../src/components/PullRequestTable/PullRequestTable.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 */\n\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport {\n PullRequest,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport React, { useState } from 'react';\n\nimport { AzurePullRequestsIcon } from '../AzurePullRequestsIcon';\nimport { DateTime } from 'luxon';\nimport { PullRequestStatusButtonGroup } from '../PullRequestStatusButtonGroup';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { usePullRequests } from '../../hooks/usePullRequests';\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'pullRequestId',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Title',\n field: 'title',\n width: 'auto',\n render: (row: Partial<PullRequest>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.title}</Link>\n {row.isDraft && (\n <Box paddingLeft={1}>\n <Chip\n label=\"Draft\"\n variant=\"outlined\"\n color=\"secondary\"\n size=\"small\"\n />\n </Box>\n )}\n </Box>\n ),\n },\n {\n title: 'Source',\n field: 'sourceRefName',\n width: 'auto',\n },\n {\n title: 'Target',\n field: 'targetRefName',\n width: 'auto',\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n {\n title: 'Created',\n field: 'creationDate',\n width: 'auto',\n render: (row: Partial<PullRequest>) =>\n (row.creationDate\n ? DateTime.fromISO(row.creationDate)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype PullRequestTableProps = {\n defaultLimit?: number;\n};\n\nexport const PullRequestTable = ({ defaultLimit }: PullRequestTableProps) => {\n const [pullRequestStatusState, setPullRequestStatusState] =\n useState<PullRequestStatus>(PullRequestStatus.Active);\n const { entity } = useEntity();\n\n const { items, loading, error } = usePullRequests(\n entity,\n defaultLimit,\n pullRequestStatusState,\n );\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePullRequestsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Pull Requests ({items ? items.length : 0})\n <Box position=\"absolute\" right={320} top={20}>\n <PullRequestStatusButtonGroup\n status={pullRequestStatusState}\n setStatus={setPullRequestStatusState}\n />\n </Box>\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoCA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,IAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,KAAO,EAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,OAAA;AAAA,IACP,KAAO,EAAA,OAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,MAAA,EAAQ,CAAC,GACP,qBAAA,KAAA,CAAA,aAAA,CAAC,OAAI,OAAQ,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PullRequestsPage/PullRequestsPage.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 */\n\nimport {\n Content,\n Header,\n Page,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { PullRequestColumnConfig, PullRequestGroup } from './lib/types';\nimport React, { useState } from 'react';\nimport { getPullRequestGroupConfigs, getPullRequestGroups } from './lib/utils';\nimport { FilterType } from './lib/filters';\nimport { PullRequestGrid } from './lib/PullRequestGrid';\nimport { useDashboardPullRequests } from '../../hooks';\nimport { useFilterProcessor } from './lib/hooks';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { azureDevOpsPullRequestDashboardReadPermission } from '@backstage-community/plugin-azure-devops-common';\n\ntype PullRequestsPageContentProps = {\n pullRequestGroups: PullRequestGroup[] | undefined;\n loading: boolean;\n error?: Error;\n};\n\nconst PullRequestsPageContent = ({\n pullRequestGroups,\n loading,\n error,\n}: PullRequestsPageContentProps) => {\n if (loading && (!pullRequestGroups || pullRequestGroups.length <= 0)) {\n return <Progress />;\n }\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return <PullRequestGrid pullRequestGroups={pullRequestGroups ?? []} />;\n};\n\nconst DEFAULT_COLUMN_CONFIGS: PullRequestColumnConfig[] = [\n {\n title: 'Created by me',\n filters: [{ type: FilterType.CreatedByCurrentUser }],\n simplified: false,\n },\n {\n title: 'Other PRs',\n filters: [{ type: FilterType.All }],\n simplified: true,\n },\n];\n\ntype PullRequestsPageProps = {\n projectName?: string;\n pollingInterval?: number;\n defaultColumnConfigs?: PullRequestColumnConfig[];\n teamsLimit?: number;\n};\n\nexport const PullRequestsPage = (props: PullRequestsPageProps) => {\n const { projectName, pollingInterval, defaultColumnConfigs, teamsLimit } =\n props;\n\n const { pullRequests, loading, error } = useDashboardPullRequests(\n projectName,\n pollingInterval,\n teamsLimit,\n );\n\n const [columnConfigs] = useState(\n defaultColumnConfigs ?? DEFAULT_COLUMN_CONFIGS,\n );\n\n const filterProcessor = useFilterProcessor();\n\n const pullRequestGroupConfigs = getPullRequestGroupConfigs(\n columnConfigs,\n filterProcessor,\n );\n\n const pullRequestGroups = getPullRequestGroups(\n pullRequests,\n pullRequestGroupConfigs,\n );\n\n return (\n <Page themeId=\"tool\">\n <Header title=\"Azure Pull Requests\" />\n <Content>\n <RequirePermission\n permission={azureDevOpsPullRequestDashboardReadPermission}\n >\n <PullRequestsPageContent\n pullRequestGroups={pullRequestGroups}\n loading={loading}\n error={error}\n />\n </RequirePermission>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuCA,MAAM,0BAA0B,CAAC;AAAA,EAC/B,iBAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AACF,CAAoC,KAAA;AAClC,EAAA,IAAI,OAAY,KAAA,CAAC,iBAAqB,IAAA,iBAAA,CAAkB,UAAU,CAAI,CAAA,EAAA;AACpE,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA,CAAA;AAAA,GACnB;AAEA,EAAA,IAAI,KAAO,EAAA;AACT,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA,CAAA;AAAA,GAC3C;AAEA,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,EAAgB,iBAAmB,EAAA,iBAAA,IAAqB,EAAI,EAAA,CAAA,CAAA;AACtE,CAAA,CAAA;AAEA,MAAM,sBAAoD,GAAA;AAAA,EACxD;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,SAAS,CAAC,EAAE,IAAM,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AA,QACA,OAAA;AAAA,QACA,KAAA;AAAA,OAAA;AAAA,KACF;AAAA,GAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestsPage.esm.js","sources":["../../../src/components/PullRequestsPage/PullRequestsPage.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 */\n\nimport {\n Content,\n Header,\n Page,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { PullRequestColumnConfig, PullRequestGroup } from './lib/types';\nimport React, { useState } from 'react';\nimport { getPullRequestGroupConfigs, getPullRequestGroups } from './lib/utils';\nimport { FilterType } from './lib/filters';\nimport { PullRequestGrid } from './lib/PullRequestGrid';\nimport { useDashboardPullRequests } from '../../hooks';\nimport { useFilterProcessor } from './lib/hooks';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { azureDevOpsPullRequestDashboardReadPermission } from '@backstage-community/plugin-azure-devops-common';\n\ntype PullRequestsPageContentProps = {\n pullRequestGroups: PullRequestGroup[] | undefined;\n loading: boolean;\n error?: Error;\n};\n\nconst PullRequestsPageContent = ({\n pullRequestGroups,\n loading,\n error,\n}: PullRequestsPageContentProps) => {\n if (loading && (!pullRequestGroups || pullRequestGroups.length <= 0)) {\n return <Progress />;\n }\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return <PullRequestGrid pullRequestGroups={pullRequestGroups ?? []} />;\n};\n\nconst DEFAULT_COLUMN_CONFIGS: PullRequestColumnConfig[] = [\n {\n title: 'Created by me',\n filters: [{ type: FilterType.CreatedByCurrentUser }],\n simplified: false,\n },\n {\n title: 'Other PRs',\n filters: [{ type: FilterType.All }],\n simplified: true,\n },\n];\n\ntype PullRequestsPageProps = {\n projectName?: string;\n pollingInterval?: number;\n defaultColumnConfigs?: PullRequestColumnConfig[];\n teamsLimit?: number;\n};\n\nexport const PullRequestsPage = (props: PullRequestsPageProps) => {\n const { projectName, pollingInterval, defaultColumnConfigs, teamsLimit } =\n props;\n\n const { pullRequests, loading, error } = useDashboardPullRequests(\n projectName,\n pollingInterval,\n teamsLimit,\n );\n\n const [columnConfigs] = useState(\n defaultColumnConfigs ?? DEFAULT_COLUMN_CONFIGS,\n );\n\n const filterProcessor = useFilterProcessor();\n\n const pullRequestGroupConfigs = getPullRequestGroupConfigs(\n columnConfigs,\n filterProcessor,\n );\n\n const pullRequestGroups = getPullRequestGroups(\n pullRequests,\n pullRequestGroupConfigs,\n );\n\n return (\n <Page themeId=\"tool\">\n <Header title=\"Azure Pull Requests\" />\n <Content>\n <RequirePermission\n permission={azureDevOpsPullRequestDashboardReadPermission}\n >\n <PullRequestsPageContent\n pullRequestGroups={pullRequestGroups}\n loading={loading}\n error={error}\n />\n </RequirePermission>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuCA,MAAM,0BAA0B,CAAC;AAAA,EAC/B,iBAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAoC,KAAA;AAClC,EAAA,IAAI,OAAY,KAAA,CAAC,iBAAqB,IAAA,iBAAA,CAAkB,UAAU,CAAI,CAAA,EAAA;AACpE,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA;AAAA;AAGnB,EAAA,IAAI,KAAO,EAAA;AACT,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA;AAAA;AAG3C,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,EAAgB,iBAAmB,EAAA,iBAAA,IAAqB,EAAI,EAAA,CAAA;AACtE,CAA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QACC,iBAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA;AAAA;AACF,GAEJ,CACF,CAAA;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
- import DoneAllIcon from '@mui/icons-material/DoneAll';
1
+ import DoneAllIcon from '@material-ui/icons/DoneAll';
2
2
  import React from 'react';
3
- import makeStyles from '@mui/styles/makeStyles';
3
+ import { makeStyles } from '@material-ui/core/styles';
4
4
 
5
5
  const useStyles = makeStyles((theme) => ({
6
6
  root: (props) => ({