@massdriver/backstage-plugin 1.0.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 (346) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +196 -0
  3. package/dist/MassdriverRouter.esm.js +78 -0
  4. package/dist/MassdriverRouter.esm.js.map +1 -0
  5. package/dist/api.esm.js +119 -0
  6. package/dist/api.esm.js.map +1 -0
  7. package/dist/assets/massdriver-logo-dark.svg +55 -0
  8. package/dist/assets/massdriver-logo-light.svg +50 -0
  9. package/dist/components/AttributesColumn.esm.js +95 -0
  10. package/dist/components/AttributesColumn.esm.js.map +1 -0
  11. package/dist/components/AttributesSummaryCell.esm.js +103 -0
  12. package/dist/components/AttributesSummaryCell.esm.js.map +1 -0
  13. package/dist/components/AuthedIcon.esm.js +26 -0
  14. package/dist/components/AuthedIcon.esm.js.map +1 -0
  15. package/dist/components/ConditionsCell.esm.js +48 -0
  16. package/dist/components/ConditionsCell.esm.js.map +1 -0
  17. package/dist/components/DisabledAction.esm.js +30 -0
  18. package/dist/components/DisabledAction.esm.js.map +1 -0
  19. package/dist/components/EntityMassdriverContent/EntityMassdriverContent.esm.js +80 -0
  20. package/dist/components/EntityMassdriverContent/EntityMassdriverContent.esm.js.map +1 -0
  21. package/dist/components/EntityMassdriverContent/index.esm.js +6 -0
  22. package/dist/components/EntityMassdriverContent/index.esm.js.map +1 -0
  23. package/dist/components/EntityMassdriverOverviewCard/EntityMassdriverOverviewCard.esm.js +75 -0
  24. package/dist/components/EntityMassdriverOverviewCard/EntityMassdriverOverviewCard.esm.js.map +1 -0
  25. package/dist/components/EntityMassdriverOverviewCard/index.esm.js +6 -0
  26. package/dist/components/EntityMassdriverOverviewCard/index.esm.js.map +1 -0
  27. package/dist/components/ForkPill.esm.js +84 -0
  28. package/dist/components/ForkPill.esm.js.map +1 -0
  29. package/dist/components/InstanceStatusIndicator.esm.js +21 -0
  30. package/dist/components/InstanceStatusIndicator.esm.js.map +1 -0
  31. package/dist/components/InstanceStatusPill.esm.js +67 -0
  32. package/dist/components/InstanceStatusPill.esm.js.map +1 -0
  33. package/dist/components/MassdriverIcon.esm.js +13 -0
  34. package/dist/components/MassdriverIcon.esm.js.map +1 -0
  35. package/dist/components/MassdriverSidebarItem.esm.js +45 -0
  36. package/dist/components/MassdriverSidebarItem.esm.js.map +1 -0
  37. package/dist/components/NotFound.esm.js +44 -0
  38. package/dist/components/NotFound.esm.js.map +1 -0
  39. package/dist/components/OpenInMassdriverButton.esm.js +24 -0
  40. package/dist/components/OpenInMassdriverButton.esm.js.map +1 -0
  41. package/dist/components/PageLayout.esm.js +88 -0
  42. package/dist/components/PageLayout.esm.js.map +1 -0
  43. package/dist/components/RouterLinkAdapter.esm.js +12 -0
  44. package/dist/components/RouterLinkAdapter.esm.js.map +1 -0
  45. package/dist/components/VersionBadge.esm.js +57 -0
  46. package/dist/components/VersionBadge.esm.js.map +1 -0
  47. package/dist/components/grantColumns.esm.js +56 -0
  48. package/dist/components/grantColumns.esm.js.map +1 -0
  49. package/dist/components/icons/BundleIcon.esm.js +7 -0
  50. package/dist/components/icons/BundleIcon.esm.js.map +1 -0
  51. package/dist/components/icons/FolderOutlinedIcon.esm.js +7 -0
  52. package/dist/components/icons/FolderOutlinedIcon.esm.js.map +1 -0
  53. package/dist/components/icons/TokenIcon.esm.js +7 -0
  54. package/dist/components/icons/TokenIcon.esm.js.map +1 -0
  55. package/dist/entity.esm.js +23 -0
  56. package/dist/entity.esm.js.map +1 -0
  57. package/dist/features/environment/CompareDeploymentsDialog/CompareDeploymentsDialog.esm.js +115 -0
  58. package/dist/features/environment/CompareDeploymentsDialog/CompareDeploymentsDialog.esm.js.map +1 -0
  59. package/dist/features/environment/CompareDeploymentsDialog/ResultsStep.esm.js +165 -0
  60. package/dist/features/environment/CompareDeploymentsDialog/ResultsStep.esm.js.map +1 -0
  61. package/dist/features/environment/CompareDeploymentsDialog/SelectStep.esm.js +216 -0
  62. package/dist/features/environment/CompareDeploymentsDialog/SelectStep.esm.js.map +1 -0
  63. package/dist/features/environment/CompareDeploymentsDialog/compareColumns.esm.js +86 -0
  64. package/dist/features/environment/CompareDeploymentsDialog/compareColumns.esm.js.map +1 -0
  65. package/dist/features/environment/CompareDeploymentsDialog/flattenDeploymentComparison.esm.js +57 -0
  66. package/dist/features/environment/CompareDeploymentsDialog/flattenDeploymentComparison.esm.js.map +1 -0
  67. package/dist/features/environment/CompareDeploymentsDialog/queries.esm.js +53 -0
  68. package/dist/features/environment/CompareDeploymentsDialog/queries.esm.js.map +1 -0
  69. package/dist/features/environment/CompareEnvironmentsDialog/CompareEnvironmentsDialog.esm.js +94 -0
  70. package/dist/features/environment/CompareEnvironmentsDialog/CompareEnvironmentsDialog.esm.js.map +1 -0
  71. package/dist/features/environment/CompareEnvironmentsDialog/ComparisonValueCell.esm.js +67 -0
  72. package/dist/features/environment/CompareEnvironmentsDialog/ComparisonValueCell.esm.js.map +1 -0
  73. package/dist/features/environment/CompareEnvironmentsDialog/ResultsStep.esm.js +202 -0
  74. package/dist/features/environment/CompareEnvironmentsDialog/ResultsStep.esm.js.map +1 -0
  75. package/dist/features/environment/CompareEnvironmentsDialog/SelectStep.esm.js +183 -0
  76. package/dist/features/environment/CompareEnvironmentsDialog/SelectStep.esm.js.map +1 -0
  77. package/dist/features/environment/CompareEnvironmentsDialog/compareColumns.esm.js +73 -0
  78. package/dist/features/environment/CompareEnvironmentsDialog/compareColumns.esm.js.map +1 -0
  79. package/dist/features/environment/CompareEnvironmentsDialog/flattenComparison.esm.js +70 -0
  80. package/dist/features/environment/CompareEnvironmentsDialog/flattenComparison.esm.js.map +1 -0
  81. package/dist/features/environment/CompareEnvironmentsDialog/queries.esm.js +32 -0
  82. package/dist/features/environment/CompareEnvironmentsDialog/queries.esm.js.map +1 -0
  83. package/dist/features/environment/EnvironmentGraphPage.esm.js +131 -0
  84. package/dist/features/environment/EnvironmentGraphPage.esm.js.map +1 -0
  85. package/dist/features/environment/GraphHeader/EnvironmentDefaults.esm.js +252 -0
  86. package/dist/features/environment/GraphHeader/EnvironmentDefaults.esm.js.map +1 -0
  87. package/dist/features/environment/GraphHeader/GraphHeader.esm.js +247 -0
  88. package/dist/features/environment/GraphHeader/GraphHeader.esm.js.map +1 -0
  89. package/dist/features/environment/GraphHeader/HeaderActions.esm.js +127 -0
  90. package/dist/features/environment/GraphHeader/HeaderActions.esm.js.map +1 -0
  91. package/dist/features/environment/GraphHeader/Switcher.esm.js +75 -0
  92. package/dist/features/environment/GraphHeader/Switcher.esm.js.map +1 -0
  93. package/dist/features/environment/GraphHeader/queries.esm.js +60 -0
  94. package/dist/features/environment/GraphHeader/queries.esm.js.map +1 -0
  95. package/dist/features/environment/InstanceDrawer/AlarmCard.esm.js +151 -0
  96. package/dist/features/environment/InstanceDrawer/AlarmCard.esm.js.map +1 -0
  97. package/dist/features/environment/InstanceDrawer/InstanceDrawer.esm.js +165 -0
  98. package/dist/features/environment/InstanceDrawer/InstanceDrawer.esm.js.map +1 -0
  99. package/dist/features/environment/InstanceDrawer/InstanceDrawerHeader.esm.js +241 -0
  100. package/dist/features/environment/InstanceDrawer/InstanceDrawerHeader.esm.js.map +1 -0
  101. package/dist/features/environment/InstanceDrawer/InstanceTabs.esm.js +119 -0
  102. package/dist/features/environment/InstanceDrawer/InstanceTabs.esm.js.map +1 -0
  103. package/dist/features/environment/InstanceDrawer/TabState.esm.js +30 -0
  104. package/dist/features/environment/InstanceDrawer/TabState.esm.js.map +1 -0
  105. package/dist/features/environment/InstanceDrawer/formsDataSource.esm.js +25 -0
  106. package/dist/features/environment/InstanceDrawer/formsDataSource.esm.js.map +1 -0
  107. package/dist/features/environment/InstanceDrawer/helpers.esm.js +282 -0
  108. package/dist/features/environment/InstanceDrawer/helpers.esm.js.map +1 -0
  109. package/dist/features/environment/InstanceDrawer/queries.esm.js +281 -0
  110. package/dist/features/environment/InstanceDrawer/queries.esm.js.map +1 -0
  111. package/dist/features/environment/InstanceDrawer/tabs/ConfigTab.esm.js +170 -0
  112. package/dist/features/environment/InstanceDrawer/tabs/ConfigTab.esm.js.map +1 -0
  113. package/dist/features/environment/InstanceDrawer/tabs/DependenciesTab.esm.js +413 -0
  114. package/dist/features/environment/InstanceDrawer/tabs/DependenciesTab.esm.js.map +1 -0
  115. package/dist/features/environment/InstanceDrawer/tabs/DeploymentLogsPanel.esm.js +191 -0
  116. package/dist/features/environment/InstanceDrawer/tabs/DeploymentLogsPanel.esm.js.map +1 -0
  117. package/dist/features/environment/InstanceDrawer/tabs/DeploymentReadOnlyActions.esm.js +63 -0
  118. package/dist/features/environment/InstanceDrawer/tabs/DeploymentReadOnlyActions.esm.js.map +1 -0
  119. package/dist/features/environment/InstanceDrawer/tabs/GuideTab.esm.js +48 -0
  120. package/dist/features/environment/InstanceDrawer/tabs/GuideTab.esm.js.map +1 -0
  121. package/dist/features/environment/InstanceDrawer/tabs/HistoryTab.esm.js +446 -0
  122. package/dist/features/environment/InstanceDrawer/tabs/HistoryTab.esm.js.map +1 -0
  123. package/dist/features/environment/InstanceDrawer/tabs/MonitorTab.esm.js +146 -0
  124. package/dist/features/environment/InstanceDrawer/tabs/MonitorTab.esm.js.map +1 -0
  125. package/dist/features/environment/InstanceDrawer/tabs/OverviewTab.esm.js +572 -0
  126. package/dist/features/environment/InstanceDrawer/tabs/OverviewTab.esm.js.map +1 -0
  127. package/dist/features/environment/InstanceDrawer/tabs/ResourcesTab.esm.js +471 -0
  128. package/dist/features/environment/InstanceDrawer/tabs/ResourcesTab.esm.js.map +1 -0
  129. package/dist/features/environment/InstanceDrawer/tabs/SecretsTab.esm.js +109 -0
  130. package/dist/features/environment/InstanceDrawer/tabs/SecretsTab.esm.js.map +1 -0
  131. package/dist/features/environment/InstanceDrawer/tabs/ViewDeploymentDetails.esm.js +384 -0
  132. package/dist/features/environment/InstanceDrawer/tabs/ViewDeploymentDetails.esm.js.map +1 -0
  133. package/dist/features/environment/InstanceDrawer/tabs/flattenParams.esm.js +23 -0
  134. package/dist/features/environment/InstanceDrawer/tabs/flattenParams.esm.js.map +1 -0
  135. package/dist/features/environment/InstanceDrawer/useInstanceApiQuery.esm.js +6 -0
  136. package/dist/features/environment/InstanceDrawer/useInstanceApiQuery.esm.js.map +1 -0
  137. package/dist/features/environment/InstanceDrawer/useOverflowMeasure.esm.js +55 -0
  138. package/dist/features/environment/InstanceDrawer/useOverflowMeasure.esm.js.map +1 -0
  139. package/dist/features/environment/InstanceDrawer/useResizableWidth.esm.js +44 -0
  140. package/dist/features/environment/InstanceDrawer/useResizableWidth.esm.js.map +1 -0
  141. package/dist/features/environment/components/InstanceStatusPill.esm.js +54 -0
  142. package/dist/features/environment/components/InstanceStatusPill.esm.js.map +1 -0
  143. package/dist/features/environment/graph/Diagram.esm.js +143 -0
  144. package/dist/features/environment/graph/Diagram.esm.js.map +1 -0
  145. package/dist/features/environment/graph/DiagramNode.constants.esm.js +5 -0
  146. package/dist/features/environment/graph/DiagramNode.constants.esm.js.map +1 -0
  147. package/dist/features/environment/graph/DiagramNode.esm.js +221 -0
  148. package/dist/features/environment/graph/DiagramNode.esm.js.map +1 -0
  149. package/dist/features/environment/graph/NodeMeta.esm.js +182 -0
  150. package/dist/features/environment/graph/NodeMeta.esm.js.map +1 -0
  151. package/dist/features/environment/graph/NodeVersionBadges.esm.js +150 -0
  152. package/dist/features/environment/graph/NodeVersionBadges.esm.js.map +1 -0
  153. package/dist/features/environment/graph/diagramFactory.esm.js +151 -0
  154. package/dist/features/environment/graph/diagramFactory.esm.js.map +1 -0
  155. package/dist/features/environment/graph/handles/ExpandableHandleWrapper.esm.js +174 -0
  156. package/dist/features/environment/graph/handles/ExpandableHandleWrapper.esm.js.map +1 -0
  157. package/dist/features/environment/graph/handles/NodeHandle.esm.js +45 -0
  158. package/dist/features/environment/graph/handles/NodeHandle.esm.js.map +1 -0
  159. package/dist/features/environment/graph/handles/NodeHandleTooltip.esm.js +134 -0
  160. package/dist/features/environment/graph/handles/NodeHandleTooltip.esm.js.map +1 -0
  161. package/dist/features/environment/graph/handles/handleTypes.esm.js +170 -0
  162. package/dist/features/environment/graph/handles/handleTypes.esm.js.map +1 -0
  163. package/dist/features/environment/graph/handles/useAnimationFrameSync.esm.js +19 -0
  164. package/dist/features/environment/graph/handles/useAnimationFrameSync.esm.js.map +1 -0
  165. package/dist/features/environment/graph/handles/useRadialPositions.esm.js +37 -0
  166. package/dist/features/environment/graph/handles/useRadialPositions.esm.js.map +1 -0
  167. package/dist/features/environment/graph/handles/useTransitionLifecycle.esm.js +19 -0
  168. package/dist/features/environment/graph/handles/useTransitionLifecycle.esm.js.map +1 -0
  169. package/dist/features/environment/graph/hasUndeployedPlan.esm.js +43 -0
  170. package/dist/features/environment/graph/hasUndeployedPlan.esm.js.map +1 -0
  171. package/dist/features/environment/graph/queries.esm.js +103 -0
  172. package/dist/features/environment/graph/queries.esm.js.map +1 -0
  173. package/dist/features/environment/graph/useDiagramSnapshot.esm.js +43 -0
  174. package/dist/features/environment/graph/useDiagramSnapshot.esm.js.map +1 -0
  175. package/dist/features/environment/realtime/RealtimeProvider.esm.js +43 -0
  176. package/dist/features/environment/realtime/RealtimeProvider.esm.js.map +1 -0
  177. package/dist/features/environment/realtime/queries.esm.js +76 -0
  178. package/dist/features/environment/realtime/queries.esm.js.map +1 -0
  179. package/dist/features/environment/realtime/useLiveRelayQuery.esm.js +36 -0
  180. package/dist/features/environment/realtime/useLiveRelayQuery.esm.js.map +1 -0
  181. package/dist/features/project/ProjectDetailsPage.esm.js +101 -0
  182. package/dist/features/project/ProjectDetailsPage.esm.js.map +1 -0
  183. package/dist/features/project/tabs/ComponentsTab.esm.js +149 -0
  184. package/dist/features/project/tabs/ComponentsTab.esm.js.map +1 -0
  185. package/dist/features/project/tabs/EnvStatus.esm.js +149 -0
  186. package/dist/features/project/tabs/EnvStatus.esm.js.map +1 -0
  187. package/dist/features/project/tabs/EnvironmentsTab.esm.js +199 -0
  188. package/dist/features/project/tabs/EnvironmentsTab.esm.js.map +1 -0
  189. package/dist/features/project/tabs/OverviewTab.esm.js +420 -0
  190. package/dist/features/project/tabs/OverviewTab.esm.js.map +1 -0
  191. package/dist/features/projects/ProjectsListPage.esm.js +50 -0
  192. package/dist/features/projects/ProjectsListPage.esm.js.map +1 -0
  193. package/dist/features/projects/ProjectsListPageLazy.esm.js +12 -0
  194. package/dist/features/projects/ProjectsListPageLazy.esm.js.map +1 -0
  195. package/dist/features/projects/projectColumns.esm.js +38 -0
  196. package/dist/features/projects/projectColumns.esm.js.map +1 -0
  197. package/dist/features/projects/useProjects.esm.js +48 -0
  198. package/dist/features/projects/useProjects.esm.js.map +1 -0
  199. package/dist/features/repo/DeploymentLogsDrawer.esm.js +213 -0
  200. package/dist/features/repo/DeploymentLogsDrawer.esm.js.map +1 -0
  201. package/dist/features/repo/DeploymentLogsDrawer.loading.esm.js +43 -0
  202. package/dist/features/repo/DeploymentLogsDrawer.loading.esm.js.map +1 -0
  203. package/dist/features/repo/FileTree.esm.js +179 -0
  204. package/dist/features/repo/FileTree.esm.js.map +1 -0
  205. package/dist/features/repo/FileViewer.esm.js +115 -0
  206. package/dist/features/repo/FileViewer.esm.js.map +1 -0
  207. package/dist/features/repo/FileViewer.helpers.esm.js +54 -0
  208. package/dist/features/repo/FileViewer.helpers.esm.js.map +1 -0
  209. package/dist/features/repo/RepoDetailsPage.esm.js +127 -0
  210. package/dist/features/repo/RepoDetailsPage.esm.js.map +1 -0
  211. package/dist/features/repo/RepoEmptyState.esm.js +58 -0
  212. package/dist/features/repo/RepoEmptyState.esm.js.map +1 -0
  213. package/dist/features/repo/RepoNoVersionsState.esm.js +29 -0
  214. package/dist/features/repo/RepoNoVersionsState.esm.js.map +1 -0
  215. package/dist/features/repo/RepoTabHeader.esm.js +30 -0
  216. package/dist/features/repo/RepoTabHeader.esm.js.map +1 -0
  217. package/dist/features/repo/RepoTabLayout.esm.js +18 -0
  218. package/dist/features/repo/RepoTabLayout.esm.js.map +1 -0
  219. package/dist/features/repo/RepoVersionSelect.esm.js +176 -0
  220. package/dist/features/repo/RepoVersionSelect.esm.js.map +1 -0
  221. package/dist/features/repo/ViewDeploymentDetailsDialog.esm.js +427 -0
  222. package/dist/features/repo/ViewDeploymentDetailsDialog.esm.js.map +1 -0
  223. package/dist/features/repo/deploymentHelpers.esm.js +74 -0
  224. package/dist/features/repo/deploymentHelpers.esm.js.map +1 -0
  225. package/dist/features/repo/fileTreeHelpers.esm.js +45 -0
  226. package/dist/features/repo/fileTreeHelpers.esm.js.map +1 -0
  227. package/dist/features/repo/flattenParams.esm.js +23 -0
  228. package/dist/features/repo/flattenParams.esm.js.map +1 -0
  229. package/dist/features/repo/queries.esm.js +239 -0
  230. package/dist/features/repo/queries.esm.js.map +1 -0
  231. package/dist/features/repo/repoFilter.esm.js +9 -0
  232. package/dist/features/repo/repoFilter.esm.js.map +1 -0
  233. package/dist/features/repo/repoTabs.esm.js +22 -0
  234. package/dist/features/repo/repoTabs.esm.js.map +1 -0
  235. package/dist/features/repo/resolveVersion.esm.js +22 -0
  236. package/dist/features/repo/resolveVersion.esm.js.map +1 -0
  237. package/dist/features/repo/tabs/DeploymentRow.esm.js +201 -0
  238. package/dist/features/repo/tabs/DeploymentRow.esm.js.map +1 -0
  239. package/dist/features/repo/tabs/DeploymentsTab.esm.js +188 -0
  240. package/dist/features/repo/tabs/DeploymentsTab.esm.js.map +1 -0
  241. package/dist/features/repo/tabs/DeploymentsTab.helpers.esm.js +46 -0
  242. package/dist/features/repo/tabs/DeploymentsTab.helpers.esm.js.map +1 -0
  243. package/dist/features/repo/tabs/DeploymentsTab.loading.esm.js +37 -0
  244. package/dist/features/repo/tabs/DeploymentsTab.loading.esm.js.map +1 -0
  245. package/dist/features/repo/tabs/FilesTab.esm.js +142 -0
  246. package/dist/features/repo/tabs/FilesTab.esm.js.map +1 -0
  247. package/dist/features/repo/tabs/InstanceRow.esm.js +121 -0
  248. package/dist/features/repo/tabs/InstanceRow.esm.js.map +1 -0
  249. package/dist/features/repo/tabs/InstancesTab.esm.js +147 -0
  250. package/dist/features/repo/tabs/InstancesTab.esm.js.map +1 -0
  251. package/dist/features/repo/tabs/InstancesTab.helpers.esm.js +44 -0
  252. package/dist/features/repo/tabs/InstancesTab.helpers.esm.js.map +1 -0
  253. package/dist/features/repo/tabs/InstancesTab.loading.esm.js +33 -0
  254. package/dist/features/repo/tabs/InstancesTab.loading.esm.js.map +1 -0
  255. package/dist/features/repo/tabs/OverviewTab.esm.js +77 -0
  256. package/dist/features/repo/tabs/OverviewTab.esm.js.map +1 -0
  257. package/dist/features/repo/tabs/PermissionsTab.esm.js +56 -0
  258. package/dist/features/repo/tabs/PermissionsTab.esm.js.map +1 -0
  259. package/dist/features/repo/tabs/VersionsTab.esm.js +152 -0
  260. package/dist/features/repo/tabs/VersionsTab.esm.js.map +1 -0
  261. package/dist/features/repo/useInfiniteRelayList.esm.js +92 -0
  262. package/dist/features/repo/useInfiniteRelayList.esm.js.map +1 -0
  263. package/dist/features/repo/useInfiniteScroll.esm.js +21 -0
  264. package/dist/features/repo/useInfiniteScroll.esm.js.map +1 -0
  265. package/dist/features/repos/ReposListPage.esm.js +53 -0
  266. package/dist/features/repos/ReposListPage.esm.js.map +1 -0
  267. package/dist/features/repos/queries.esm.js +40 -0
  268. package/dist/features/repos/queries.esm.js.map +1 -0
  269. package/dist/features/repos/repoColumns.esm.js +121 -0
  270. package/dist/features/repos/repoColumns.esm.js.map +1 -0
  271. package/dist/features/repos/useRepos.esm.js +22 -0
  272. package/dist/features/repos/useRepos.esm.js.map +1 -0
  273. package/dist/features/resource/OriginChip.esm.js +42 -0
  274. package/dist/features/resource/OriginChip.esm.js.map +1 -0
  275. package/dist/features/resource/ResourceDetailsPage.esm.js +167 -0
  276. package/dist/features/resource/ResourceDetailsPage.esm.js.map +1 -0
  277. package/dist/features/resource/queries.esm.js +141 -0
  278. package/dist/features/resource/queries.esm.js.map +1 -0
  279. package/dist/features/resource/tabs/GeneralTab.esm.js +247 -0
  280. package/dist/features/resource/tabs/GeneralTab.esm.js.map +1 -0
  281. package/dist/features/resource/tabs/GeneralTab.loading.esm.js +76 -0
  282. package/dist/features/resource/tabs/GeneralTab.loading.esm.js.map +1 -0
  283. package/dist/features/resource/tabs/PermissionsTab.esm.js +57 -0
  284. package/dist/features/resource/tabs/PermissionsTab.esm.js.map +1 -0
  285. package/dist/features/resource/tabs/SettingsTabLayout.esm.js +18 -0
  286. package/dist/features/resource/tabs/SettingsTabLayout.esm.js.map +1 -0
  287. package/dist/features/resource/tabs/TabHeader.esm.js +30 -0
  288. package/dist/features/resource/tabs/TabHeader.esm.js.map +1 -0
  289. package/dist/features/resource/tabs/UsagePanel.esm.js +35 -0
  290. package/dist/features/resource/tabs/UsagePanel.esm.js.map +1 -0
  291. package/dist/features/resource/tabs/UsageTab.esm.js +91 -0
  292. package/dist/features/resource/tabs/UsageTab.esm.js.map +1 -0
  293. package/dist/features/resource/tabs/UsageTab.helpers.esm.js +168 -0
  294. package/dist/features/resource/tabs/UsageTab.helpers.esm.js.map +1 -0
  295. package/dist/features/resources/ResourcesEmptyState.esm.js +148 -0
  296. package/dist/features/resources/ResourcesEmptyState.esm.js.map +1 -0
  297. package/dist/features/resources/ResourcesListPage.esm.js +115 -0
  298. package/dist/features/resources/ResourcesListPage.esm.js.map +1 -0
  299. package/dist/features/resources/queries.esm.js +50 -0
  300. package/dist/features/resources/queries.esm.js.map +1 -0
  301. package/dist/features/resources/resourceColumns.esm.js +158 -0
  302. package/dist/features/resources/resourceColumns.esm.js.map +1 -0
  303. package/dist/features/resources/resourceConstants.esm.js +7 -0
  304. package/dist/features/resources/resourceConstants.esm.js.map +1 -0
  305. package/dist/features/resources/toResourceRow.esm.js +29 -0
  306. package/dist/features/resources/toResourceRow.esm.js.map +1 -0
  307. package/dist/hooks/useAuthedSvg.esm.js +34 -0
  308. package/dist/hooks/useAuthedSvg.esm.js.map +1 -0
  309. package/dist/hooks/useCursorPagination.esm.js +40 -0
  310. package/dist/hooks/useCursorPagination.esm.js.map +1 -0
  311. package/dist/hooks/useMassdriverSubscription.esm.js +61 -0
  312. package/dist/hooks/useMassdriverSubscription.esm.js.map +1 -0
  313. package/dist/hooks/usePaginatedRelayQuery.esm.js +68 -0
  314. package/dist/hooks/usePaginatedRelayQuery.esm.js.map +1 -0
  315. package/dist/index.d.ts +256 -0
  316. package/dist/index.esm.js +8 -0
  317. package/dist/index.esm.js.map +1 -0
  318. package/dist/internalRoutes.esm.js +29 -0
  319. package/dist/internalRoutes.esm.js.map +1 -0
  320. package/dist/plugin.esm.js +57 -0
  321. package/dist/plugin.esm.js.map +1 -0
  322. package/dist/queries.esm.js +54 -0
  323. package/dist/queries.esm.js.map +1 -0
  324. package/dist/routes.esm.js +6 -0
  325. package/dist/routes.esm.js.map +1 -0
  326. package/dist/shell/MassdriverHeader.esm.js +37 -0
  327. package/dist/shell/MassdriverHeader.esm.js.map +1 -0
  328. package/dist/shell/MassdriverShell.esm.js +30 -0
  329. package/dist/shell/MassdriverShell.esm.js.map +1 -0
  330. package/dist/theme/MassdriverThemeScope.esm.js +30 -0
  331. package/dist/theme/MassdriverThemeScope.esm.js.map +1 -0
  332. package/dist/theme/ThemeModeContext.esm.js +35 -0
  333. package/dist/theme/ThemeModeContext.esm.js.map +1 -0
  334. package/dist/theme/muiClassNameAudit.esm.js +11 -0
  335. package/dist/theme/muiClassNameAudit.esm.js.map +1 -0
  336. package/dist/useInstances.esm.js +39 -0
  337. package/dist/useInstances.esm.js.map +1 -0
  338. package/dist/utils/attributes.esm.js +28 -0
  339. package/dist/utils/attributes.esm.js.map +1 -0
  340. package/dist/utils/conditions.esm.js +20 -0
  341. package/dist/utils/conditions.esm.js.map +1 -0
  342. package/dist/utils/formatRelativeTime.esm.js +40 -0
  343. package/dist/utils/formatRelativeTime.esm.js.map +1 -0
  344. package/dist/utils/instanceStatuses.esm.js +74 -0
  345. package/dist/utils/instanceStatuses.esm.js.map +1 -0
  346. package/package.json +92 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,196 @@
1
+ # Massdriver Backstage plugin
2
+
3
+ Surface your [Massdriver](https://www.massdriver.cloud/) infrastructure inside
4
+ Backstage: projects, environment graphs, instance details, repositories, and
5
+ resources — plus a status card and tab for any catalog entity you link to a
6
+ Massdriver project, environment, or instance. Everything is read-only and
7
+ updates live; actions deep-link into the Massdriver app.
8
+
9
+ ## Packages
10
+
11
+ | Package | Role |
12
+ | -------------------------------------- | ---------------------------------------------------------- |
13
+ | `@massdriver/backstage-plugin` | Frontend: Massdriver pages, entity card, entity tab |
14
+ | `@massdriver/backstage-plugin-backend` | Backend: authenticated GraphQL relay + realtime SSE bridge |
15
+ | `@massdriver/backstage-plugin-common` | Shared types, annotations, deep-link builders |
16
+
17
+ ## Requirements
18
+
19
+ - A Backstage app on the **New Frontend System** (`createApp` from
20
+ `@backstage/frontend-defaults`). The plugin is built with frontend-system
21
+ blueprints and does not support the legacy frontend system.
22
+ - The Backstage backend must have outbound HTTPS **and WebSocket** access to
23
+ your Massdriver API origin (`https://api.massdriver.cloud` unless
24
+ self-hosted) — WebSockets power the live-update bridge.
25
+ - A Massdriver **service account** (instructions below).
26
+
27
+ ## Install
28
+
29
+ From your Backstage repo root:
30
+
31
+ ```bash
32
+ # Frontend
33
+ yarn --cwd packages/app add @massdriver/backstage-plugin
34
+
35
+ # Backend relay
36
+ yarn --cwd packages/backend add \
37
+ @massdriver/backstage-plugin-backend
38
+ ```
39
+
40
+ Add the backend plugin in `packages/backend/src/index.ts`:
41
+
42
+ ```ts
43
+ backend.add(import('@massdriver/backstage-plugin-backend'));
44
+ ```
45
+
46
+ The frontend registers itself automatically if your app uses package discovery
47
+ (`app: { packages: all }` in `app-config.yaml`). Without discovery, add it as
48
+ an explicit feature in `packages/app/src/App.tsx`:
49
+
50
+ ```ts
51
+ import massdriverPlugin from '@massdriver/backstage-plugin';
52
+
53
+ export default createApp({
54
+ features: [
55
+ // ...your other features
56
+ massdriverPlugin,
57
+ ],
58
+ });
59
+ ```
60
+
61
+ Either way you get the `/massdriver` pages, the entity overview card, and the
62
+ "Massdriver" entity tab.
63
+
64
+ ## Configuration
65
+
66
+ ```yaml
67
+ # app-config.yaml
68
+ massdriver:
69
+ organizationId: ${MASSDRIVER_ORG_ID}
70
+ apiToken: ${MASSDRIVER_API_TOKEN}
71
+ # Optional — only for self-hosted Massdriver installations:
72
+ # baseUrl: ${MASSDRIVER_API_URL} # default: https://api.massdriver.cloud
73
+ # appUrl: ${MASSDRIVER_APP_URL} # default: https://app.massdriver.cloud
74
+ ```
75
+
76
+ | Key | Env var (suggested) | Required | Visibility | Description |
77
+ | --------------------------- | ---------------------- | -------- | ---------- | -------------------------------------------------------------------------------------------- |
78
+ | `massdriver.organizationId` | `MASSDRIVER_ORG_ID` | yes | frontend | Your Massdriver organization ID. |
79
+ | `massdriver.apiToken` | `MASSDRIVER_API_TOKEN` | yes | **secret** | Service-account bearer token used by the backend relay. Never sent to the browser. |
80
+ | `massdriver.baseUrl` | `MASSDRIVER_API_URL` | no | frontend | Massdriver API origin. Only set for self-hosted installations. |
81
+ | `massdriver.appUrl` | `MASSDRIVER_APP_URL` | no | frontend | Massdriver web app origin, used to build deep-links. Only set for self-hosted installations. |
82
+
83
+ ### Getting the values
84
+
85
+ - **Organization ID** (`MASSDRIVER_ORG_ID`): log into the
86
+ [Massdriver app](https://app.massdriver.cloud) — the ID is the URL segment
87
+ after `/orgs/` on any page (`https://app.massdriver.cloud/orgs/<org-id>/…`),
88
+ and is also shown under **Organization settings → General**.
89
+ - **API token** (`MASSDRIVER_API_TOKEN`): create a service account under
90
+ **Organization settings → Service accounts**
91
+ (`https://app.massdriver.cloud/orgs/<org-id>/settings/service-accounts`) and
92
+ copy its token. See the [Massdriver docs](https://docs.massdriver.cloud) for
93
+ details on service accounts.
94
+
95
+ `apiToken` is declared with `secret` visibility in the config schema: Backstage
96
+ strips it from frontend config automatically. Still, keep it out of committed
97
+ files — put it in `app-config.local.yaml` (gitignored), an environment
98
+ variable, or your secret store, like any other Backstage secret.
99
+
100
+ ## What you get
101
+
102
+ - **`/massdriver/projects`** — organization-wide projects list, and per-project
103
+ details with tabs.
104
+ - **`/massdriver/projects/:project/environments/:environment`** — the
105
+ environment graph: packages, connections, statuses, and an instance drawer
106
+ with overview, configuration, deployment history, logs, resources, and
107
+ dependencies. Environments and deployments can be compared side by side.
108
+ - **`/massdriver/repositories`** — bundle repositories, versions, and files.
109
+ - **`/massdriver/resources`** — cloud resources with usage and details.
110
+ - **Entity overview card** and **Massdriver tab** on any catalog entity
111
+ annotated with a `massdriver.cloud/*` ID (below), showing instance status,
112
+ versions, and "Open in Massdriver" deep-links.
113
+
114
+ All views are read-only and update live. Actions that change infrastructure
115
+ (deploy, decommission, configuration edits, …) deep-link into the Massdriver
116
+ app.
117
+
118
+ The plugin does **not** mirror infrastructure into the Backstage catalog; you
119
+ link your existing catalog entities to Massdriver via annotations.
120
+
121
+ ## Sidebar
122
+
123
+ On the default nav, the plugin contributes a flat **Massdriver** sidebar link
124
+ automatically — nothing to do.
125
+
126
+ If your app customizes the sidebar (`NavContentBlueprint`), you can render the
127
+ plugin's ready-made entry instead: the Massdriver logo linking to the projects
128
+ list, with a **Projects / Resources / Repositories** submenu matching the
129
+ Massdriver web app:
130
+
131
+ ```tsx
132
+ import { MassdriverSidebarItem } from '@massdriver/backstage-plugin';
133
+
134
+ // Inside your NavContentBlueprint component: swap the plugin's default flat
135
+ // item for the submenu entry, and render everything else as usual.
136
+ const nav = navItems.withComponent(item =>
137
+ item.href?.startsWith('/massdriver') ? (
138
+ <MassdriverSidebarItem />
139
+ ) : (
140
+ <SidebarItem icon={() => item.icon} to={item.href} text={item.title} />
141
+ ),
142
+ );
143
+ ```
144
+
145
+ (If you build your `<Sidebar>` without the `navItems` API, just place
146
+ `<MassdriverSidebarItem />` wherever it belongs — but then make sure the
147
+ default Massdriver nav item isn't also rendered, or it will appear twice.)
148
+
149
+ ## Annotations
150
+
151
+ Add one of these to an entity's `catalog-info.yaml` to attach the Massdriver
152
+ card + tab, pointing at the most specific matching Massdriver resource:
153
+
154
+ ```yaml
155
+ metadata:
156
+ annotations:
157
+ massdriver.cloud/project-id: my-project
158
+ # or the more specific scopes:
159
+ # massdriver.cloud/environment-id: my-project-prod
160
+ # massdriver.cloud/instance-id: my-project-prod-cache
161
+ ```
162
+
163
+ If an entity carries more than one, the most specific wins: `instance-id` >
164
+ `environment-id` > `project-id`. An optional `massdriver.cloud/org-id`
165
+ annotation can accompany any of them to pin the organization explicitly (useful
166
+ mainly in multi-org setups); it defaults to the configured
167
+ `massdriver.organizationId`.
168
+
169
+ ## Security & authorization
170
+
171
+ - The service-account token lives only in backend config (`secret`
172
+ visibility); the browser talks exclusively to the relay, which injects the
173
+ token and your `organizationId` server-side. Client-supplied organization
174
+ IDs are ignored.
175
+ - The relay exposes **no mutation endpoints** — it forwards read queries and a
176
+ read-only realtime subscription stream.
177
+ - Any authenticated Backstage user sees whatever the service account can read.
178
+ This is an org-wide, read-only integration; there is no per-user scoping in
179
+ this version.
180
+
181
+ ## Troubleshooting
182
+
183
+ **Massdriver pages load but details look subtly wrong (misaligned switch
184
+ thumbs, tooltip arrows, chip padding).** In development the plugin logs a
185
+ `console.warn` starting with `[backstage-plugin-massdriver] MUI v5 class-name
186
+ mismatch detected` when it can diagnose the cause: something in your app
187
+ evaluates `@mui/material` during startup, before Backstage configures its MUI
188
+ v5 class-name prefix — usually an eager import of a MUI v5 component (or a
189
+ library re-exporting one) in custom app chrome or another plugin's package
190
+ root. Move that import behind a dynamic `import()` (or out of the startup
191
+ path). Background: [backstage#31846](https://github.com/backstage/backstage/issues/31846).
192
+
193
+ **No data / errors on Massdriver pages.** Check the backend logs — the relay
194
+ logs Massdriver API failures. Verify `massdriver.apiToken` and
195
+ `massdriver.organizationId`, and that the backend can reach your API origin
196
+ over both HTTPS and WSS.
@@ -0,0 +1,78 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Routes, Route, Navigate } from 'react-router-dom';
3
+ import { NotFound } from './components/NotFound.esm.js';
4
+ import { EnvironmentGraphPage } from './features/environment/EnvironmentGraphPage.esm.js';
5
+ import { ProjectDetailsPage } from './features/project/ProjectDetailsPage.esm.js';
6
+ import { ProjectsListPage } from './features/projects/ProjectsListPage.esm.js';
7
+ import { RepoDetailsPage } from './features/repo/RepoDetailsPage.esm.js';
8
+ import { ReposListPage } from './features/repos/ReposListPage.esm.js';
9
+ import { ResourceDetailsPage } from './features/resource/ResourceDetailsPage.esm.js';
10
+ import { ResourcesListPage } from './features/resources/ResourcesListPage.esm.js';
11
+
12
+ const MassdriverRouter = () => /* @__PURE__ */ jsxs(Routes, { children: [
13
+ /* @__PURE__ */ jsx(Route, { index: true, element: /* @__PURE__ */ jsx(Navigate, { to: "projects", replace: true }) }),
14
+ /* @__PURE__ */ jsx(Route, { path: "projects", element: /* @__PURE__ */ jsx(ProjectsListPage, {}) }),
15
+ /* @__PURE__ */ jsx(
16
+ Route,
17
+ {
18
+ path: "projects/:projectId",
19
+ element: /* @__PURE__ */ jsx(Navigate, { to: "overview", replace: true })
20
+ }
21
+ ),
22
+ /* @__PURE__ */ jsx(
23
+ Route,
24
+ {
25
+ path: "projects/:projectId/environments/:scopedEnvironmentId",
26
+ element: /* @__PURE__ */ jsx(EnvironmentGraphPage, {})
27
+ }
28
+ ),
29
+ /* @__PURE__ */ jsx(
30
+ Route,
31
+ {
32
+ path: "projects/:projectId/environments/:scopedEnvironmentId/instances/:scopedComponentId",
33
+ element: /* @__PURE__ */ jsx(EnvironmentGraphPage, {})
34
+ }
35
+ ),
36
+ /* @__PURE__ */ jsx(Route, { path: "projects/:projectId/:tab", element: /* @__PURE__ */ jsx(ProjectDetailsPage, {}) }),
37
+ /* @__PURE__ */ jsx(Route, { path: "repositories", element: /* @__PURE__ */ jsx(ReposListPage, {}) }),
38
+ /* @__PURE__ */ jsx(
39
+ Route,
40
+ {
41
+ path: "repositories/:repoId",
42
+ element: /* @__PURE__ */ jsx(Navigate, { to: "all", replace: true })
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsx(
46
+ Route,
47
+ {
48
+ path: "repositories/:repoId/:version",
49
+ element: /* @__PURE__ */ jsx(Navigate, { to: "overview", replace: true })
50
+ }
51
+ ),
52
+ /* @__PURE__ */ jsx(
53
+ Route,
54
+ {
55
+ path: "repositories/:repoId/:version/:tab",
56
+ element: /* @__PURE__ */ jsx(RepoDetailsPage, {})
57
+ }
58
+ ),
59
+ /* @__PURE__ */ jsx(Route, { path: "resources", element: /* @__PURE__ */ jsx(ResourcesListPage, {}) }),
60
+ /* @__PURE__ */ jsx(
61
+ Route,
62
+ {
63
+ path: "resources/:resourceId",
64
+ element: /* @__PURE__ */ jsx(Navigate, { to: "general", replace: true })
65
+ }
66
+ ),
67
+ /* @__PURE__ */ jsx(
68
+ Route,
69
+ {
70
+ path: "resources/:resourceId/:tab",
71
+ element: /* @__PURE__ */ jsx(ResourceDetailsPage, {})
72
+ }
73
+ ),
74
+ /* @__PURE__ */ jsx(Route, { path: "*", element: /* @__PURE__ */ jsx(NotFound, {}) })
75
+ ] });
76
+
77
+ export { MassdriverRouter };
78
+ //# sourceMappingURL=MassdriverRouter.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MassdriverRouter.esm.js","sources":["../src/MassdriverRouter.tsx"],"sourcesContent":["import { Navigate, Route, Routes } from 'react-router-dom';\nimport { NotFound } from './components/NotFound';\nimport { EnvironmentGraphPage } from './features/environment/EnvironmentGraphPage';\nimport { ProjectDetailsPage } from './features/project/ProjectDetailsPage';\nimport { ProjectsListPage } from './features/projects/ProjectsListPage';\nimport { RepoDetailsPage } from './features/repo/RepoDetailsPage';\nimport { ReposListPage } from './features/repos/ReposListPage';\nimport { ResourceDetailsPage } from './features/resource/ResourceDetailsPage';\nimport { ResourcesListPage } from './features/resources/ResourcesListPage';\n\n/**\n * Internal drill-down routing for the embedded Massdriver views, mounted under\n * the plugin's `/massdriver` page. The index redirects to `/massdriver/projects`.\n */\nexport const MassdriverRouter = () => (\n <Routes>\n <Route index element={<Navigate to=\"projects\" replace />} />\n <Route path=\"projects\" element={<ProjectsListPage />} />\n <Route\n path=\"projects/:projectId\"\n element={<Navigate to=\"overview\" replace />}\n />\n <Route\n path=\"projects/:projectId/environments/:scopedEnvironmentId\"\n element={<EnvironmentGraphPage />}\n />\n <Route\n path=\"projects/:projectId/environments/:scopedEnvironmentId/instances/:scopedComponentId\"\n element={<EnvironmentGraphPage />}\n />\n <Route path=\"projects/:projectId/:tab\" element={<ProjectDetailsPage />} />\n <Route path=\"repositories\" element={<ReposListPage />} />\n <Route\n path=\"repositories/:repoId\"\n element={<Navigate to=\"all\" replace />}\n />\n <Route\n path=\"repositories/:repoId/:version\"\n element={<Navigate to=\"overview\" replace />}\n />\n <Route\n path=\"repositories/:repoId/:version/:tab\"\n element={<RepoDetailsPage />}\n />\n <Route path=\"resources\" element={<ResourcesListPage />} />\n <Route\n path=\"resources/:resourceId\"\n element={<Navigate to=\"general\" replace />}\n />\n <Route\n path=\"resources/:resourceId/:tab\"\n element={<ResourceDetailsPage />}\n />\n <Route path=\"*\" element={<NotFound />} />\n </Routes>\n);\n"],"names":[],"mappings":";;;;;;;;;;;AAcO,MAAM,gBAAA,GAAmB,sBAC9B,IAAA,CAAC,MAAA,EAAA,EACC,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,KAAA,EAAK,IAAA,EAAC,OAAA,kBAAS,GAAA,CAAC,YAAS,EAAA,EAAG,UAAA,EAAW,OAAA,EAAO,IAAA,EAAC,CAAA,EAAI,CAAA;AAAA,sBACzD,KAAA,EAAA,EAAM,IAAA,EAAK,YAAW,OAAA,kBAAS,GAAA,CAAC,oBAAiB,CAAA,EAAI,CAAA;AAAA,kBACtD,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,qBAAA;AAAA,MACL,yBAAS,GAAA,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AA;AAAA,MACC,IAAA,EAAK,uBAAA;AAAA,MACL,yBAAS,GAAA,CAAC,QAAA,EAAA,EAAS,EAAA,EAAG,SAAA,EAAU,SAAO,IAAA,EAAC;AAAA;AAAA,GAC1C;AAAA,kBACA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,4BAAA;AAAA,MACL,OAAA,sBAAU,mBAAA,EAAA,EAAoB;AAAA;AAAA,GAChC;AAAA,sBACC,KAAA,EAAA,EAAM,IAAA,EAAK,KAAI,OAAA,kBAAS,GAAA,CAAC,YAAS,CAAA,EAAI;AAAA,CAAA,EACzC;;;;"}
@@ -0,0 +1,119 @@
1
+ import { createApiRef } from '@backstage/frontend-plugin-api';
2
+ import { DEFAULT_APP_URL, MASSDRIVER_CONFIG_KEY } from '@massdriver/backstage-plugin-common';
3
+
4
+ const massdriverApiRef = createApiRef({
5
+ id: "plugin.massdriver.api"
6
+ });
7
+ class MassdriverClientApi {
8
+ fetchApi;
9
+ appUrl;
10
+ organizationId;
11
+ constructor(options) {
12
+ this.fetchApi = options.fetchApi;
13
+ this.appUrl = options.configApi.getOptionalString(`${MASSDRIVER_CONFIG_KEY}.appUrl`) ?? DEFAULT_APP_URL;
14
+ this.organizationId = options.configApi.getOptionalString(
15
+ `${MASSDRIVER_CONFIG_KEY}.organizationId`
16
+ ) ?? "";
17
+ }
18
+ async query(query, variables) {
19
+ const response = await this.fetchApi.fetch("plugin://massdriver/graphql", {
20
+ method: "POST",
21
+ headers: { "content-type": "application/json" },
22
+ body: JSON.stringify({ query, variables })
23
+ });
24
+ if (!response.ok) {
25
+ throw new Error(
26
+ `Massdriver request failed: ${response.status} ${response.statusText}`
27
+ );
28
+ }
29
+ const body = await response.json();
30
+ if (body.errors?.length) {
31
+ throw new Error(body.errors.map((error) => error.message).join("; "));
32
+ }
33
+ return body.data;
34
+ }
35
+ async fetchText(url) {
36
+ const response = await this.fetchApi.fetch(
37
+ `plugin://massdriver/content?url=${encodeURIComponent(url)}`
38
+ );
39
+ if (!response.ok) {
40
+ throw new Error(
41
+ `Massdriver content fetch failed: ${response.status} ${response.statusText}`
42
+ );
43
+ }
44
+ return response.text();
45
+ }
46
+ async subscribe(query, variables, handlers, signal) {
47
+ let response;
48
+ try {
49
+ response = await this.fetchApi.fetch("plugin://massdriver/subscribe", {
50
+ method: "POST",
51
+ headers: { "content-type": "application/json" },
52
+ body: JSON.stringify({ query, variables }),
53
+ signal
54
+ });
55
+ } catch (error) {
56
+ if (signal?.aborted) return;
57
+ handlers.onError?.(error);
58
+ return;
59
+ }
60
+ if (!response.ok || !response.body) {
61
+ const requestFailed = Object.assign(
62
+ new Error(
63
+ `Massdriver subscription failed: ${response.status} ${response.statusText}`
64
+ ),
65
+ {
66
+ status: response.status,
67
+ fatal: response.status >= 400 && response.status < 500 && response.status !== 429
68
+ }
69
+ );
70
+ handlers.onError?.(requestFailed);
71
+ return;
72
+ }
73
+ const reader = response.body.getReader();
74
+ const decoder = new TextDecoder();
75
+ let buffer = "";
76
+ const handleFrame = (frame) => {
77
+ let eventName = null;
78
+ const dataLines = [];
79
+ for (const line of frame.split("\n")) {
80
+ if (line.startsWith(":")) continue;
81
+ if (line.startsWith("event:")) eventName = line.slice(6).trim();
82
+ else if (line.startsWith("data:")) dataLines.push(line.slice(5).trim());
83
+ }
84
+ if (dataLines.length === 0) return;
85
+ const payload = JSON.parse(dataLines.join("\n"));
86
+ if (eventName === "error") {
87
+ const streamError = Object.assign(
88
+ new Error(payload?.message ?? "Subscription error"),
89
+ { fatal: Boolean(payload?.fatal) }
90
+ );
91
+ handlers.onError?.(streamError);
92
+ return;
93
+ }
94
+ handlers.onData(payload);
95
+ };
96
+ try {
97
+ for (; ; ) {
98
+ const { done, value } = await reader.read();
99
+ if (done) break;
100
+ buffer += decoder.decode(value, { stream: true });
101
+ let index = buffer.indexOf("\n\n");
102
+ while (index !== -1) {
103
+ const frame = buffer.slice(0, index);
104
+ buffer = buffer.slice(index + 2);
105
+ if (frame.trim()) handleFrame(frame);
106
+ index = buffer.indexOf("\n\n");
107
+ }
108
+ }
109
+ } catch (error) {
110
+ if (!signal?.aborted) handlers.onError?.(error);
111
+ } finally {
112
+ reader.cancel().catch(() => {
113
+ });
114
+ }
115
+ }
116
+ }
117
+
118
+ export { MassdriverClientApi, massdriverApiRef };
119
+ //# sourceMappingURL=api.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.esm.js","sources":["../src/api.ts"],"sourcesContent":["import {\n ConfigApi,\n createApiRef,\n FetchApi,\n} from '@backstage/frontend-plugin-api';\nimport {\n DEFAULT_APP_URL,\n MASSDRIVER_CONFIG_KEY,\n} from '@massdriver/backstage-plugin-common';\n\n/**\n * Subscription errors carry `fatal: true` when retrying cannot succeed — a 4xx\n * from the relay (unauthenticated/invalid request) or an upstream Absinthe\n * channel rejection (bad document / unknown environment). The reconnect loop in\n * `useMassdriverSubscription` stops on fatal errors instead of retrying forever.\n *\n * @public\n */\nexport type MassdriverSubscriptionError = Error & {\n fatal?: boolean;\n status?: number;\n};\n\n/**\n * Frontend API for talking to Massdriver via the backend relay.\n *\n * All queries are proxied through `plugin://massdriver/graphql`, where the\n * backend injects the service-account bearer token. The browser never sees the\n * token, and `organizationId` is injected server-side, so callers only declare\n * `$organizationId` in their operations.\n *\n * @public\n */\nexport interface MassdriverApi {\n /** Web app origin used to build deep-links. */\n readonly appUrl: string;\n /** Massdriver organization id, when configured on the frontend. */\n readonly organizationId: string;\n query<T = unknown>(\n query: string,\n variables?: Record<string, unknown>,\n ): Promise<T>;\n /**\n * Fetch an auth-guarded Massdriver asset (OCI repo icon SVG, repo tag file\n * contents) as text, via the backend content proxy — the web app fetches\n * these directly with the browser's bearer token, which this plugin's\n * browser doesn't hold.\n */\n fetchText(url: string): Promise<string>;\n /**\n * Open a GraphQL subscription via the backend SSE relay. Invokes\n * `handlers.onData` with each streamed result's `data`. The returned promise\n * resolves when the stream ends (server close, error, or abort). Pass a\n * `signal` to tear the subscription down.\n */\n subscribe<T = unknown>(\n query: string,\n variables: Record<string, unknown> | undefined,\n handlers: { onData: (data: T) => void; onError?: (error: Error) => void },\n signal?: AbortSignal,\n ): Promise<void>;\n}\n\n/** @public */\nexport const massdriverApiRef = createApiRef<MassdriverApi>({\n id: 'plugin.massdriver.api',\n});\n\n/** @public */\nexport class MassdriverClientApi implements MassdriverApi {\n private readonly fetchApi: FetchApi;\n readonly appUrl: string;\n readonly organizationId: string;\n\n constructor(options: { fetchApi: FetchApi; configApi: ConfigApi }) {\n this.fetchApi = options.fetchApi;\n this.appUrl =\n options.configApi.getOptionalString(`${MASSDRIVER_CONFIG_KEY}.appUrl`) ??\n DEFAULT_APP_URL;\n this.organizationId =\n options.configApi.getOptionalString(\n `${MASSDRIVER_CONFIG_KEY}.organizationId`,\n ) ?? '';\n }\n\n async query<T = unknown>(\n query: string,\n variables?: Record<string, unknown>,\n ): Promise<T> {\n const response = await this.fetchApi.fetch('plugin://massdriver/graphql', {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ query, variables }),\n });\n\n if (!response.ok) {\n throw new Error(\n `Massdriver request failed: ${response.status} ${response.statusText}`,\n );\n }\n\n const body = (await response.json()) as {\n data?: T;\n errors?: Array<{ message: string }>;\n };\n\n if (body.errors?.length) {\n throw new Error(body.errors.map(error => error.message).join('; '));\n }\n\n return body.data as T;\n }\n\n async fetchText(url: string): Promise<string> {\n const response = await this.fetchApi.fetch(\n `plugin://massdriver/content?url=${encodeURIComponent(url)}`,\n );\n if (!response.ok) {\n throw new Error(\n `Massdriver content fetch failed: ${response.status} ${response.statusText}`,\n );\n }\n return response.text();\n }\n\n async subscribe<T = unknown>(\n query: string,\n variables: Record<string, unknown> | undefined,\n handlers: { onData: (data: T) => void; onError?: (error: Error) => void },\n signal?: AbortSignal,\n ): Promise<void> {\n let response: Response;\n try {\n response = await this.fetchApi.fetch('plugin://massdriver/subscribe', {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ query, variables }),\n signal,\n });\n } catch (error) {\n // A fetch abort is an intentional teardown, not an error.\n if (signal?.aborted) return;\n handlers.onError?.(error as Error);\n return;\n }\n\n if (!response.ok || !response.body) {\n // 4xx (except 429) won't heal on retry — flag fatal so the reconnect\n // loop stops instead of hammering the relay.\n const requestFailed: MassdriverSubscriptionError = Object.assign(\n new Error(\n `Massdriver subscription failed: ${response.status} ${response.statusText}`,\n ),\n {\n status: response.status,\n fatal:\n response.status >= 400 &&\n response.status < 500 &&\n response.status !== 429,\n },\n );\n handlers.onError?.(requestFailed);\n return;\n }\n\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n\n const handleFrame = (frame: string) => {\n let eventName: string | null = null;\n const dataLines: string[] = [];\n for (const line of frame.split('\\n')) {\n if (line.startsWith(':')) continue; // keepalive comment\n if (line.startsWith('event:')) eventName = line.slice(6).trim();\n else if (line.startsWith('data:')) dataLines.push(line.slice(5).trim());\n }\n if (dataLines.length === 0) return;\n\n const payload = JSON.parse(dataLines.join('\\n'));\n if (eventName === 'error') {\n const streamError: MassdriverSubscriptionError = Object.assign(\n new Error(payload?.message ?? 'Subscription error'),\n { fatal: Boolean(payload?.fatal) },\n );\n handlers.onError?.(streamError);\n return;\n }\n handlers.onData(payload as T);\n };\n\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n // SSE frames are separated by a blank line.\n let index = buffer.indexOf('\\n\\n');\n while (index !== -1) {\n const frame = buffer.slice(0, index);\n buffer = buffer.slice(index + 2);\n if (frame.trim()) handleFrame(frame);\n index = buffer.indexOf('\\n\\n');\n }\n }\n } catch (error) {\n if (!signal?.aborted) handlers.onError?.(error as Error);\n } finally {\n reader.cancel().catch(() => {});\n }\n }\n}\n"],"names":[],"mappings":";;;AAgEO,MAAM,mBAAmB,YAAA,CAA4B;AAAA,EAC1D,EAAA,EAAI;AACN,CAAC;AAGM,MAAM,mBAAA,CAA6C;AAAA,EACvC,QA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