@coffre/ui 0.1.18 → 0.3.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 (236) hide show
  1. package/README.md +23 -3
  2. package/dist/{server/_coffre/assets/affordances-CKANXDTG.js → chunks/affordances-DAvsVz7u.js} +12 -7
  3. package/dist/chunks/affordances-DAvsVz7u.js.map +1 -0
  4. package/dist/chunks/directory-CSjWWUQ1.js +370 -0
  5. package/dist/chunks/directory-CSjWWUQ1.js.map +1 -0
  6. package/dist/{server/_coffre/assets/grants-DdKT11Ny.js → chunks/grants-saMQagmG.js} +41 -39
  7. package/dist/chunks/grants-saMQagmG.js.map +1 -0
  8. package/dist/chunks/icons-D-PfAfnH.js +203 -0
  9. package/dist/chunks/icons-D-PfAfnH.js.map +1 -0
  10. package/dist/chunks/mounted-jJmqqV_n.js +17 -0
  11. package/dist/chunks/mounted-jJmqqV_n.js.map +1 -0
  12. package/dist/{server/_coffre/assets/offboarding-CRz-K82H.js → chunks/offboarding-C6l30DZR.js} +70 -69
  13. package/dist/chunks/offboarding-C6l30DZR.js.map +1 -0
  14. package/dist/chunks/page-C5HcNqf2.js +190 -0
  15. package/dist/chunks/page-C5HcNqf2.js.map +1 -0
  16. package/dist/chunks/page-route-Drfw7lmn.js +20 -0
  17. package/dist/chunks/page-route-Drfw7lmn.js.map +1 -0
  18. package/dist/{server/_coffre/assets/principal-page-C-EFwJQw.js → chunks/principal-page-D_91OA0l.js} +105 -103
  19. package/dist/chunks/principal-page-D_91OA0l.js.map +1 -0
  20. package/dist/{server/_coffre/assets → chunks}/project-environments-lEzFHUt4.js +2 -0
  21. package/dist/chunks/project-environments-lEzFHUt4.js.map +1 -0
  22. package/dist/chunks/queries-CQ81o4so.js +376 -0
  23. package/dist/chunks/queries-CQ81o4so.js.map +1 -0
  24. package/dist/{server/_coffre/assets/row-state-C2P57xT1.js → chunks/row-state-0PsrEzOL.js} +22 -21
  25. package/dist/chunks/row-state-0PsrEzOL.js.map +1 -0
  26. package/dist/{server/_coffre/assets → chunks}/signin-errors-BEFlVDbQ.js +2 -0
  27. package/dist/chunks/signin-errors-BEFlVDbQ.js.map +1 -0
  28. package/dist/chunks/theme-B2vQolVR.js +86 -0
  29. package/dist/chunks/theme-B2vQolVR.js.map +1 -0
  30. package/dist/chunks/ui-DixXLQvQ.js +405 -0
  31. package/dist/chunks/ui-DixXLQvQ.js.map +1 -0
  32. package/dist/{server/_coffre/assets/use-action-B-xpvVRO.js → chunks/use-action-CWsg_YWU.js} +8 -6
  33. package/dist/chunks/use-action-CWsg_YWU.js.map +1 -0
  34. package/dist/{server/_coffre/assets/use-change-C8BCf3oU.js → chunks/use-change-c6CeLRin.js} +10 -474
  35. package/dist/chunks/use-change-c6CeLRin.js.map +1 -0
  36. package/dist/chunks/use-shell-jxd7Tzd-.js +26 -0
  37. package/dist/chunks/use-shell-jxd7Tzd-.js.map +1 -0
  38. package/dist/{server/_coffre/assets → chunks}/validation-BQtqPe2V.js +2 -0
  39. package/dist/chunks/validation-BQtqPe2V.js.map +1 -0
  40. package/dist/index.d.ts +386 -18
  41. package/dist/index.js +1147 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/pages/account.d.ts +9 -0
  44. package/dist/pages/account.js +334 -0
  45. package/dist/pages/account.js.map +1 -0
  46. package/dist/pages/audit.d.ts +3 -0
  47. package/dist/{server/_coffre/assets/audit-qB9G2AQJ.js → pages/audit.js} +102 -100
  48. package/dist/pages/audit.js.map +1 -0
  49. package/dist/pages/device-login.d.ts +9 -0
  50. package/dist/pages/device-login.js +211 -0
  51. package/dist/pages/device-login.js.map +1 -0
  52. package/dist/pages/environment.d.ts +3 -0
  53. package/dist/{server/_coffre/assets/projects._project._environment-C6uybzeU.js → pages/environment.js} +323 -469
  54. package/dist/pages/environment.js.map +1 -0
  55. package/dist/pages/login.d.ts +10 -0
  56. package/dist/pages/login.js +104 -0
  57. package/dist/pages/login.js.map +1 -0
  58. package/dist/pages/project.d.ts +2 -0
  59. package/dist/{server/_coffre/assets/projects._project.index-3CXwkyTh.js → pages/project.js} +223 -225
  60. package/dist/pages/project.js.map +1 -0
  61. package/dist/pages/projects.d.ts +3 -0
  62. package/dist/{server/_coffre/assets/projects.index-iSoBpRFz.js → pages/projects.js} +83 -81
  63. package/dist/pages/projects.js.map +1 -0
  64. package/dist/pages/settings.d.ts +3 -0
  65. package/dist/{server/_coffre/assets/settings-BDQTF5XW.js → pages/settings.js} +20 -18
  66. package/dist/pages/settings.js.map +1 -0
  67. package/dist/pages/token.d.ts +3 -0
  68. package/dist/{server/_coffre/assets/tokens._token-CrBMpcbN.js → pages/token.js} +198 -267
  69. package/dist/pages/token.js.map +1 -0
  70. package/dist/pages/tokens.d.ts +3 -0
  71. package/dist/pages/tokens.js +39 -0
  72. package/dist/pages/tokens.js.map +1 -0
  73. package/dist/pages/unregistered.d.ts +8 -0
  74. package/dist/pages/unregistered.js +54 -0
  75. package/dist/pages/unregistered.js.map +1 -0
  76. package/dist/pages/user.d.ts +3 -0
  77. package/dist/pages/user.js +16 -0
  78. package/dist/pages/user.js.map +1 -0
  79. package/dist/pages/users.d.ts +3 -0
  80. package/dist/pages/users.js +39 -0
  81. package/dist/pages/users.js.map +1 -0
  82. package/dist/project-BqIy8gYR.d.ts +5 -0
  83. package/dist/vite.d.ts +16 -0
  84. package/dist/vite.js +52 -0
  85. package/package.json +36 -21
  86. package/src/assets/icon.svg +1 -0
  87. package/src/components/affordances.ts +10 -4
  88. package/src/components/command-palette.tsx +229 -203
  89. package/src/components/directory.tsx +34 -38
  90. package/src/components/principal.tsx +7 -3
  91. package/src/components/service-tokens.tsx +3 -2
  92. package/src/components/shell.tsx +89 -127
  93. package/src/components/theme.tsx +14 -81
  94. package/src/components/ui.tsx +97 -68
  95. package/src/index.ts +29 -0
  96. package/src/layout.tsx +113 -0
  97. package/src/lib/coffre.ts +8 -4
  98. package/src/lib/mounted.ts +13 -0
  99. package/src/lib/page-context.ts +31 -0
  100. package/src/lib/page-route.ts +22 -0
  101. package/src/lib/preferences.tsx +46 -0
  102. package/src/options.ts +240 -0
  103. package/src/{routes → pages}/account.tsx +7 -24
  104. package/src/{routes → pages}/audit.tsx +5 -16
  105. package/src/{routes/auth.device.tsx → pages/device-login.tsx} +8 -21
  106. package/src/{routes/projects.$project.$environment.tsx → pages/environment.tsx} +43 -52
  107. package/src/{routes → pages}/login.tsx +5 -16
  108. package/src/{routes/projects.$project.index.tsx → pages/project.tsx} +38 -50
  109. package/src/{routes/projects.index.tsx → pages/projects.tsx} +2 -7
  110. package/src/{routes → pages}/settings.tsx +3 -10
  111. package/src/{routes/tokens.$token.tsx → pages/token.tsx} +6 -7
  112. package/src/{routes/tokens.index.tsx → pages/tokens.tsx} +3 -8
  113. package/src/{routes → pages}/unregistered.tsx +1 -6
  114. package/src/pages/user.tsx +10 -0
  115. package/src/{routes/users.index.tsx → pages/users.tsx} +3 -8
  116. package/src/register.ts +55 -0
  117. package/src/router.tsx +31 -62
  118. package/src/styles/globals.css +104 -46
  119. package/src/vite.ts +78 -0
  120. package/dist/client/.assetsignore +0 -2
  121. package/dist/client/_coffre/assets/account-BoLGAxbD.js +0 -2
  122. package/dist/client/_coffre/assets/account-CnnuRTDB.js +0 -1
  123. package/dist/client/_coffre/assets/affordances-CEafRJcN.js +0 -1
  124. package/dist/client/_coffre/assets/audit-CHSvKLWX.js +0 -1
  125. package/dist/client/_coffre/assets/audit-Cn4hmS4u.js +0 -2
  126. package/dist/client/_coffre/assets/auth.device-Co5vrpaA.js +0 -2
  127. package/dist/client/_coffre/assets/auth.device-DAlqWacc.js +0 -1
  128. package/dist/client/_coffre/assets/directory-H8Eh3MnS.js +0 -1
  129. package/dist/client/_coffre/assets/dist-Braunv_x.js +0 -1
  130. package/dist/client/_coffre/assets/globals-CpMrgkV6.css +0 -1
  131. package/dist/client/_coffre/assets/grants-DPDxJXU1.js +0 -1
  132. package/dist/client/_coffre/assets/icons-Dc_-t0lp.js +0 -1
  133. package/dist/client/_coffre/assets/index-sUCIXRgJ.js +0 -12
  134. package/dist/client/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
  135. package/dist/client/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
  136. package/dist/client/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
  137. package/dist/client/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
  138. package/dist/client/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
  139. package/dist/client/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
  140. package/dist/client/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
  141. package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
  142. package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  143. package/dist/client/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  144. package/dist/client/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  145. package/dist/client/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  146. package/dist/client/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  147. package/dist/client/_coffre/assets/link-DBINMwm6.js +0 -1
  148. package/dist/client/_coffre/assets/login-BZFYfL1Y.js +0 -1
  149. package/dist/client/_coffre/assets/login-CYCKWTOD.js +0 -2
  150. package/dist/client/_coffre/assets/offboarding-Bwpftp3g.js +0 -1
  151. package/dist/client/_coffre/assets/page-C_hnzdaR.js +0 -1
  152. package/dist/client/_coffre/assets/preload-helper-CLkO85Nq.js +0 -1
  153. package/dist/client/_coffre/assets/principal-page-DLho8TSJ.js +0 -1
  154. package/dist/client/_coffre/assets/project-environments-CfIH5kFM.js +0 -1
  155. package/dist/client/_coffre/assets/projects._project._environment-DHRRvQw0.js +0 -3
  156. package/dist/client/_coffre/assets/projects._project._environment-TLI-RjBZ.js +0 -2
  157. package/dist/client/_coffre/assets/projects._project.index-BO-8FZIY.js +0 -2
  158. package/dist/client/_coffre/assets/projects._project.index-DGl921dP.js +0 -1
  159. package/dist/client/_coffre/assets/projects.index-BDn7Bhoo.js +0 -1
  160. package/dist/client/_coffre/assets/row-state-DJ-KLamZ.js +0 -1
  161. package/dist/client/_coffre/assets/settings-q9G1QvR_.js +0 -1
  162. package/dist/client/_coffre/assets/signin-errors-CroZWZgm.js +0 -1
  163. package/dist/client/_coffre/assets/suspense-O8sP0mEC.js +0 -1
  164. package/dist/client/_coffre/assets/tokens._token-B_qczpT9.js +0 -2
  165. package/dist/client/_coffre/assets/tokens._token-T-sqwMbz.js +0 -2
  166. package/dist/client/_coffre/assets/tokens.index-CcXSZnAG.js +0 -1
  167. package/dist/client/_coffre/assets/ui-BXP2IqrW.js +0 -46
  168. package/dist/client/_coffre/assets/unregistered-D2JXJ90x.js +0 -1
  169. package/dist/client/_coffre/assets/use-action-BpzKWhgg.js +0 -1
  170. package/dist/client/_coffre/assets/use-change-CKj3Inq9.js +0 -1
  171. package/dist/client/_coffre/assets/use-shell-W0SusPkz.js +0 -1
  172. package/dist/client/_coffre/assets/useQuery-B-lxFSES.js +0 -1
  173. package/dist/client/_coffre/assets/useSuspenseQuery-BZ-nzHST.js +0 -1
  174. package/dist/client/_coffre/assets/users._user-Bb3BGYHl.js +0 -1
  175. package/dist/client/_coffre/assets/users._user-DXmvKrzE.js +0 -2
  176. package/dist/client/_coffre/assets/users.index-BvzP3qwW.js +0 -1
  177. package/dist/client/_coffre/assets/validation-9Cl_XS-l.js +0 -1
  178. package/dist/server/.vite/manifest.json +0 -668
  179. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-GsKnGGRy.js +0 -162
  180. package/dist/server/_coffre/assets/account-CV-a2IU2.js +0 -329
  181. package/dist/server/_coffre/assets/account-hk6wcIXU.js +0 -162
  182. package/dist/server/_coffre/assets/async-local-storage-C10uQtMM.js +0 -3108
  183. package/dist/server/_coffre/assets/audit-C1_Ej6YB.js +0 -31
  184. package/dist/server/_coffre/assets/auth.device-6JRrWbSV.js +0 -210
  185. package/dist/server/_coffre/assets/auth.device-CLoAxC2T.js +0 -29
  186. package/dist/server/_coffre/assets/directory-B-_rqsPx.js +0 -371
  187. package/dist/server/_coffre/assets/dist-CnnV3t2g.js +0 -908
  188. package/dist/server/_coffre/assets/empty-plugin-adapters-Cq4--YW-.js +0 -5
  189. package/dist/server/_coffre/assets/globals-CpMrgkV6.css +0 -1
  190. package/dist/server/_coffre/assets/icons-DOFT-eWB.js +0 -1704
  191. package/dist/server/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
  192. package/dist/server/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
  193. package/dist/server/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
  194. package/dist/server/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
  195. package/dist/server/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
  196. package/dist/server/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
  197. package/dist/server/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
  198. package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
  199. package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  200. package/dist/server/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  201. package/dist/server/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  202. package/dist/server/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  203. package/dist/server/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  204. package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +0 -480
  205. package/dist/server/_coffre/assets/link-42ZWdjzZ.js +0 -422
  206. package/dist/server/_coffre/assets/login-DRKUKkaW.js +0 -22
  207. package/dist/server/_coffre/assets/login-DnwxVl4Y.js +0 -102
  208. package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +0 -56
  209. package/dist/server/_coffre/assets/page-D6n45dcK.js +0 -3561
  210. package/dist/server/_coffre/assets/projects._project._environment-CS8DdSMY.js +0 -48
  211. package/dist/server/_coffre/assets/projects._project.index-BGfcNpj0.js +0 -23
  212. package/dist/server/_coffre/assets/react-dom-bBoJXlK2.js +0 -1718
  213. package/dist/server/_coffre/assets/router-9BTgJhWG.js +0 -2322
  214. package/dist/server/_coffre/assets/start-DR3rN0St.js +0 -4
  215. package/dist/server/_coffre/assets/suspense-C-2QfDd2.js +0 -602
  216. package/dist/server/_coffre/assets/tokens._token-rY86Cjgp.js +0 -10
  217. package/dist/server/_coffre/assets/tokens.index-Bq5qDW9q.js +0 -37
  218. package/dist/server/_coffre/assets/ui-Cc0CGMtr.js +0 -14881
  219. package/dist/server/_coffre/assets/unregistered-D9ZKLOPJ.js +0 -53
  220. package/dist/server/_coffre/assets/use-shell-DwOzEi87.js +0 -462
  221. package/dist/server/_coffre/assets/useQuery-CTe86qFq.js +0 -8
  222. package/dist/server/_coffre/assets/useRouter-CaUSUNsw.js +0 -473
  223. package/dist/server/_coffre/assets/useSuspenseQuery-CSoHzrMb.js +0 -117
  224. package/dist/server/_coffre/assets/users._user-BmLKYeo_.js +0 -10
  225. package/dist/server/_coffre/assets/users._user-BmiHwQx3.js +0 -14
  226. package/dist/server/_coffre/assets/users.index-BiEax90r.js +0 -37
  227. package/dist/server/index.js +0 -13911
  228. package/src/assets/favicon-32.png +0 -0
  229. package/src/components/agentation.tsx +0 -34
  230. package/src/entry.ts +0 -19
  231. package/src/routeTree.gen.ts +0 -367
  232. package/src/routes/__root.tsx +0 -169
  233. package/src/routes/access.tsx +0 -11
  234. package/src/routes/index.tsx +0 -15
  235. package/src/routes/users.$user.tsx +0 -13
  236. package/src/types.ts +0 -21
@@ -1,17 +1,18 @@
1
- import { i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
2
- import { C as useCoffre, b as memberRef, h as queries, o as affects, t as Card } from "./page-D6n45dcK.js";
3
- import { b as revokeCredential, g as removeBinding, n as useChangeStatus, t as useChange } from "./use-change-C8BCf3oU.js";
4
- import { t as useShell } from "./use-shell-DwOzEi87.js";
5
- import { t as useSuspenseQuery } from "./useSuspenseQuery-CSoHzrMb.js";
6
- import { a as ErrorLine, c as Spinner, i as EmptyState, l as Timestamp, o as Modal, r as CopyButton, s as Notice, t as ConfirmButton } from "./ui-Cc0CGMtr.js";
7
- import { G as X, j as Plus, m as GitHub, v as Key, x as Link } from "./icons-DOFT-eWB.js";
8
- import { a as rowClass, i as RowPending, r as RowFailure } from "./row-state-C2P57xT1.js";
9
- import { t as Route } from "./tokens._token-rY86Cjgp.js";
10
- import { t as useAction } from "./use-action-B-xpvVRO.js";
11
- import { t as PrincipalPage } from "./principal-page-C-EFwJQw.js";
1
+ import { a as ErrorLine, c as Notice, i as EmptyState, l as Spinner, r as CopyButton, s as Modal, t as ConfirmButton, u as Timestamp } from "../chunks/ui-DixXLQvQ.js";
2
+ import { G as X, j as Plus, m as GitHub, v as Key, x as Link } from "../chunks/icons-D-PfAfnH.js";
3
+ import { s as memberRef, t as Card, u as useCoffre } from "../chunks/page-C5HcNqf2.js";
4
+ import { a as rowClass, i as RowPending, r as RowFailure } from "../chunks/row-state-0PsrEzOL.js";
5
+ import { t as affects, u as queries } from "../chunks/queries-CQ81o4so.js";
6
+ import { t as useShell } from "../chunks/use-shell-jxd7Tzd-.js";
7
+ import { b as revokeCredential, g as removeBinding, n as useChangeStatus, t as useChange } from "../chunks/use-change-c6CeLRin.js";
8
+ import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
9
+ import { t as useAction } from "../chunks/use-action-CWsg_YWU.js";
10
+ import { t as PrincipalPage } from "../chunks/principal-page-D_91OA0l.js";
11
+ import { Fragment, useState } from "react";
12
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ import { useSuspenseQuery } from "@tanstack/react-query";
14
+ import { GITHUB_EVENTS, GITLAB_PIPELINE_SOURCES, fullRef, githubReusable, githubWorkflow, gitlabProject } from "@coffre/core/workloads";
12
15
  //#region src/components/service-tokens.tsx
13
- var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
14
- var import_jsx_runtime = require_jsx_runtime();
15
16
  var LIFETIMES = [
16
17
  30,
17
18
  90,
@@ -26,91 +27,91 @@ function ServiceTokens({ serviceId, tokens }) {
26
27
  const change = revokeCredential(useCoffre(), serviceId);
27
28
  const revoke = useChange(change);
28
29
  const { status, dismiss } = useChangeStatus(change.list.queryKey);
29
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
30
+ return /* @__PURE__ */ jsx(Card, {
30
31
  labelledBy: "service-tokens",
31
32
  title: "Credentials",
32
33
  description: "Bearer tokens this service presents to the API. Each is shown once, when it is issued; coffre keeps only a hash.",
33
- actions: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IssueToken, { serviceId }),
34
- children: tokens.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, {
34
+ actions: /* @__PURE__ */ jsx(IssueToken, { serviceId }),
35
+ children: tokens.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
35
36
  title: "No live credentials",
36
37
  children: "Nothing can act as this service until a token is issued."
37
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
38
+ }) : /* @__PURE__ */ jsx("div", {
38
39
  className: "dt-wrap",
39
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
40
+ children: /* @__PURE__ */ jsxs("table", {
40
41
  className: "dt",
41
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
42
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Token" }),
43
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
42
+ children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
43
+ /* @__PURE__ */ jsx("th", { children: "Token" }),
44
+ /* @__PURE__ */ jsx("th", {
44
45
  className: "col-shrink",
45
46
  children: "Issued (UTC)"
46
47
  }),
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
48
+ /* @__PURE__ */ jsx("th", {
48
49
  className: "col-shrink",
49
50
  children: "Last used"
50
51
  }),
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
52
+ /* @__PURE__ */ jsx("th", {
52
53
  className: "col-shrink",
53
54
  children: "Expires"
54
55
  }),
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
56
+ /* @__PURE__ */ jsx("th", {
56
57
  className: "col-actions",
57
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
58
+ children: /* @__PURE__ */ jsx("span", {
58
59
  className: "visually-hidden",
59
60
  children: "Actions"
60
61
  })
61
62
  })
62
- ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: tokens.map((token) => {
63
+ ] }) }), /* @__PURE__ */ jsx("tbody", { children: tokens.map((token) => {
63
64
  const state = status(token.id);
64
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
65
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("tr", {
65
66
  className: rowClass(state),
66
67
  children: [
67
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
68
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsxs("span", {
68
69
  className: "cell-account",
69
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Key, { size: 15 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
70
+ children: [/* @__PURE__ */ jsx(Key, { size: 15 }), /* @__PURE__ */ jsxs("span", {
70
71
  className: "cell-stack",
71
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: token.label ?? "Unlabelled" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", {
72
+ children: [/* @__PURE__ */ jsx("span", { children: token.label ?? "Unlabelled" }), /* @__PURE__ */ jsx("small", {
72
73
  className: "mono",
73
74
  children: token.hint
74
75
  })]
75
76
  })]
76
77
  }) }),
77
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
78
+ /* @__PURE__ */ jsx("td", {
78
79
  className: "nowrap",
79
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
80
+ children: /* @__PURE__ */ jsxs("span", {
80
81
  className: "cell-stack",
81
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, { iso: token.createdAt }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("small", { children: ["by ", token.createdBy] })]
82
+ children: [/* @__PURE__ */ jsx(Timestamp, { iso: token.createdAt }), /* @__PURE__ */ jsxs("small", { children: ["by ", token.createdBy] })]
82
83
  })
83
84
  }),
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
85
+ /* @__PURE__ */ jsx("td", {
85
86
  className: "nowrap cell-muted",
86
- children: token.lastUsedAt === null ? "Never" : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
87
+ children: token.lastUsedAt === null ? "Never" : /* @__PURE__ */ jsxs("span", {
87
88
  className: "cell-stack",
88
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
89
+ children: [/* @__PURE__ */ jsx(Timestamp, {
89
90
  iso: token.lastUsedAt,
90
91
  display: "relative"
91
- }), token.lastUsedIp !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", {
92
+ }), token.lastUsedIp !== null && /* @__PURE__ */ jsx("small", {
92
93
  className: "mono",
93
94
  children: token.lastUsedIp
94
95
  })]
95
96
  })
96
97
  }),
97
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
98
+ /* @__PURE__ */ jsx("td", {
98
99
  className: "nowrap cell-muted",
99
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
100
+ children: /* @__PURE__ */ jsx(Timestamp, {
100
101
  iso: token.expiresAt,
101
102
  display: "relative"
102
103
  })
103
104
  }),
104
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
105
+ /* @__PURE__ */ jsx("td", {
105
106
  className: "col-actions",
106
- children: state.state === "pending" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowPending, { status: state }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmButton, {
107
- trigger: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
107
+ children: state.state === "pending" ? /* @__PURE__ */ jsx(RowPending, { status: state }) : /* @__PURE__ */ jsx(ConfirmButton, {
108
+ trigger: /* @__PURE__ */ jsxs("button", {
108
109
  className: "act",
109
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { size: 13 }), "Revoke"]
110
+ children: [/* @__PURE__ */ jsx(X, { size: 13 }), "Revoke"]
110
111
  }),
111
- title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
112
+ title: /* @__PURE__ */ jsxs(Fragment$1, { children: [
112
113
  "Revoke ",
113
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
114
+ /* @__PURE__ */ jsx("span", {
114
115
  className: "mono",
115
116
  children: token.hint
116
117
  }),
@@ -122,7 +123,7 @@ function ServiceTokens({ serviceId, tokens }) {
122
123
  })
123
124
  })
124
125
  ]
125
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowFailure, {
126
+ }), /* @__PURE__ */ jsx(RowFailure, {
126
127
  status: state,
127
128
  columns: 5,
128
129
  onDismiss: () => state.state === "failed" && dismiss(state.mutationId)
@@ -133,10 +134,10 @@ function ServiceTokens({ serviceId, tokens }) {
133
134
  });
134
135
  }
135
136
  function IssueToken({ serviceId }) {
136
- const [open, setOpen] = (0, import_react.useState)(false);
137
- const [label, setLabel] = (0, import_react.useState)("");
138
- const [days, setDays] = (0, import_react.useState)(90);
139
- const [issued, setIssued] = (0, import_react.useState)(null);
137
+ const [open, setOpen] = useState(false);
138
+ const [label, setLabel] = useState("");
139
+ const [days, setDays] = useState(90);
140
+ const [issued, setIssued] = useState(null);
140
141
  const coffre = useCoffre();
141
142
  const { pending, error, setError, run } = useAction();
142
143
  function close() {
@@ -145,15 +146,15 @@ function IssueToken({ serviceId }) {
145
146
  setLabel("");
146
147
  setError(null);
147
148
  }
148
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
149
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("button", {
149
150
  className: "btn btn-sm",
150
151
  onClick: () => setOpen(true),
151
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Plus, { size: 14 }), "Issue token"]
152
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modal, {
152
+ children: [/* @__PURE__ */ jsx(Plus, { size: 14 }), "Issue token"]
153
+ }), /* @__PURE__ */ jsx(Modal, {
153
154
  open,
154
155
  onOpenChange: (next) => next ? setOpen(true) : close(),
155
156
  title: issued === null ? "Issue a token" : "Copy the token now",
156
- children: issued === null ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
157
+ children: issued === null ? /* @__PURE__ */ jsxs("form", {
157
158
  className: "form",
158
159
  onSubmit: (event) => {
159
160
  event.preventDefault();
@@ -166,93 +167,94 @@ function IssueToken({ serviceId }) {
166
167
  });
167
168
  },
168
169
  children: [
169
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
170
+ /* @__PURE__ */ jsxs("div", {
170
171
  className: "form-row",
171
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
172
+ children: [/* @__PURE__ */ jsxs("label", {
172
173
  className: "field",
173
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
174
+ children: [/* @__PURE__ */ jsx("span", {
174
175
  className: "label",
175
176
  children: "Label"
176
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
177
+ }), /* @__PURE__ */ jsx("input", {
177
178
  className: "input",
178
179
  value: label,
179
180
  maxLength: 120,
180
181
  placeholder: "GitHub Actions deploy",
181
182
  onChange: (event) => setLabel(event.target.value)
182
183
  })]
183
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
184
+ }), /* @__PURE__ */ jsxs("label", {
184
185
  className: "field",
185
186
  style: { flex: "0 0 9rem" },
186
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
187
+ children: [/* @__PURE__ */ jsx("span", {
187
188
  className: "label",
188
189
  children: "Expires after"
189
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("select", {
190
+ }), /* @__PURE__ */ jsx("select", {
190
191
  className: "select",
191
192
  value: days,
192
193
  onChange: (event) => setDays(Number(event.target.value)),
193
- children: LIFETIMES.map((lifetime) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("option", {
194
+ children: LIFETIMES.map((lifetime) => /* @__PURE__ */ jsxs("option", {
194
195
  value: lifetime,
195
196
  children: [lifetime, " days"]
196
197
  }, lifetime))
197
198
  })]
198
199
  })]
199
200
  }),
200
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error }),
201
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
201
+ /* @__PURE__ */ jsx(ErrorLine, { error }),
202
+ /* @__PURE__ */ jsxs("div", {
202
203
  className: "dialog-actions",
203
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
204
+ children: [/* @__PURE__ */ jsx("button", {
204
205
  className: "btn",
205
206
  type: "button",
206
207
  onClick: close,
207
208
  children: "Cancel"
208
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
209
+ }), /* @__PURE__ */ jsxs("button", {
209
210
  className: "btn btn-primary",
210
211
  type: "submit",
211
212
  disabled: pending,
212
- children: [pending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), "Issue token"]
213
+ children: [pending && /* @__PURE__ */ jsx(Spinner, {}), "Issue token"]
213
214
  })]
214
215
  })
215
216
  ]
216
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
217
+ }) : /* @__PURE__ */ jsxs("div", {
217
218
  className: "form",
218
219
  children: [
219
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Notice, {
220
+ /* @__PURE__ */ jsxs(Notice, {
220
221
  tone: "info",
221
222
  children: [
222
- "This is the only time the value is shown. Store it where the service reads its configuration, as ",
223
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
223
+ "This is the only time the value is shown. Store it where the service keeps its secrets; a CI run signs the CLI in with it, piped to",
224
+ " ",
225
+ /* @__PURE__ */ jsx("span", {
224
226
  className: "mono",
225
- children: "COFFRE_TOKEN"
227
+ children: "coffre login <url> --token"
226
228
  }),
227
229
  "."
228
230
  ]
229
231
  }),
230
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
232
+ /* @__PURE__ */ jsxs("div", {
231
233
  className: "token-once",
232
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
234
+ children: [/* @__PURE__ */ jsx("code", {
233
235
  className: "mono",
234
236
  children: issued.token
235
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyButton, {
237
+ }), /* @__PURE__ */ jsx(CopyButton, {
236
238
  value: issued.token,
237
239
  label: "Copy token"
238
240
  })]
239
241
  }),
240
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
242
+ /* @__PURE__ */ jsxs("p", {
241
243
  className: "hint",
242
244
  children: [
243
245
  "Expires ",
244
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, { iso: issued.expiresAt }),
246
+ /* @__PURE__ */ jsx(Timestamp, { iso: issued.expiresAt }),
245
247
  ". Send it as",
246
248
  " ",
247
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
249
+ /* @__PURE__ */ jsx("span", {
248
250
  className: "mono",
249
251
  children: "Authorization: Bearer …"
250
252
  })
251
253
  ]
252
254
  }),
253
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
255
+ /* @__PURE__ */ jsx("div", {
254
256
  className: "dialog-actions",
255
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
257
+ children: /* @__PURE__ */ jsx("button", {
256
258
  className: "btn btn-primary",
257
259
  type: "button",
258
260
  onClick: close,
@@ -264,80 +266,6 @@ function IssueToken({ serviceId }) {
264
266
  })] });
265
267
  }
266
268
  //#endregion
267
- //#region ../core/dist/workloads.js
268
- /**
269
- * Events triggered by someone with write access, at a ref the binding names
270
- * exactly. `pull_request`, `pull_request_target`, `workflow_run` and the
271
- * rest are refused, even when their ref happens to match: their runs can
272
- * carry a stranger's code.
273
- */
274
- var GITHUB_EVENTS = [
275
- "push",
276
- "workflow_dispatch",
277
- "schedule",
278
- "release"
279
- ];
280
- /** Pipelines that run the project's own code, at its own ref: never a merge request's. */
281
- var GITLAB_PIPELINE_SOURCES = [
282
- "push",
283
- "web",
284
- "schedule"
285
- ];
286
- /** `refs/heads/main`, or `refs/tags/v1`, as GitHub names a ref. */
287
- function fullRef(kind, name) {
288
- return `refs/${kind === "branch" ? "heads" : "tags"}/${name}`;
289
- }
290
- /** A workflow file at a ref, as GitHub's tokens name it: `acme/api/.github/workflows/deploy.yml@refs/heads/main`. */
291
- function workflowRef(repository, file, ref) {
292
- return `${repository}/.github/workflows/${file.replace(/^\.github\/workflows\//, "")}@${ref}`;
293
- }
294
- /** A workflow of the repository, run by `event` at `ref`. */
295
- function githubWorkflow(input) {
296
- return {
297
- profile: "github",
298
- claims: {
299
- repository_owner_id: input.ownerId,
300
- repository_id: input.repositoryId,
301
- workflow_ref: workflowRef(input.repository, input.workflow, input.ref),
302
- ref: input.ref,
303
- event_name: input.event
304
- }
305
- };
306
- }
307
- /**
308
- * A reusable workflow at one commit, called at `ref`: from one repository,
309
- * or, with `repositoryId` null, from any repository of the organization. A
310
- * `caller` workflow narrows it to one calling workflow.
311
- */
312
- function githubReusable(input) {
313
- const claims = {
314
- repository_owner_id: input.ownerId,
315
- ...input.repositoryId === null ? {} : { repository_id: input.repositoryId },
316
- ref: input.ref,
317
- event_name: input.event,
318
- job_workflow_ref: input.called,
319
- job_workflow_sha: input.sha
320
- };
321
- if (input.caller !== void 0) claims.workflow_ref = workflowRef(input.caller.repository, input.caller.workflow, input.ref);
322
- return {
323
- profile: input.repositoryId === null ? "github-reusable-organization" : "github-reusable",
324
- claims
325
- };
326
- }
327
- /** A GitLab project's pipelines from `source`, at a branch or tag. */
328
- function gitlabProject(input) {
329
- return {
330
- profile: "gitlab",
331
- claims: {
332
- namespace_id: input.namespaceId,
333
- project_id: input.projectId,
334
- ref_type: input.refType,
335
- ref: input.ref,
336
- pipeline_source: input.source
337
- }
338
- };
339
- }
340
- //#endregion
341
269
  //#region src/lib/bindings.ts
342
270
  /**
343
271
  * Trust bindings as the pages show and make them. A binding is its claims;
@@ -471,77 +399,77 @@ function TrustedWorkloads({ serviceId, bindings }) {
471
399
  const change = removeBinding(useCoffre(), serviceId);
472
400
  const remove = useChange(change);
473
401
  const { status, dismiss } = useChangeStatus(change.list.queryKey);
474
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
402
+ return /* @__PURE__ */ jsx(Card, {
475
403
  labelledBy: "trusted-workloads",
476
404
  title: "Trusted workloads",
477
405
  description: "CI runs that may sign in as this service with the ID token their platform signs, when every claim of a binding matches. Nothing long-lived is stored.",
478
- actions: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TrustWorkload, { serviceId }),
479
- children: bindings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, {
406
+ actions: /* @__PURE__ */ jsx(TrustWorkload, { serviceId }),
407
+ children: bindings.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
480
408
  title: "No trusted workloads",
481
409
  children: "CI can still use a token. Trust a workflow to let its runs sign in without one."
482
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
410
+ }) : /* @__PURE__ */ jsx("div", {
483
411
  className: "dt-wrap",
484
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
412
+ children: /* @__PURE__ */ jsxs("table", {
485
413
  className: "dt",
486
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
487
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Workload" }),
488
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
414
+ children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
415
+ /* @__PURE__ */ jsx("th", { children: "Workload" }),
416
+ /* @__PURE__ */ jsx("th", {
489
417
  className: "col-shrink",
490
418
  children: "Added (UTC)"
491
419
  }),
492
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
420
+ /* @__PURE__ */ jsx("th", {
493
421
  className: "col-shrink",
494
422
  children: "Last used"
495
423
  }),
496
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
424
+ /* @__PURE__ */ jsx("th", {
497
425
  className: "col-actions",
498
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
426
+ children: /* @__PURE__ */ jsx("span", {
499
427
  className: "visually-hidden",
500
428
  children: "Actions"
501
429
  })
502
430
  })
503
- ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: bindings.map((binding) => {
431
+ ] }) }), /* @__PURE__ */ jsx("tbody", { children: bindings.map((binding) => {
504
432
  const state = status(binding.id);
505
433
  const { title, detail } = summary(binding);
506
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
434
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("tr", {
507
435
  className: rowClass(state),
508
436
  children: [
509
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
437
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsxs("span", {
510
438
  className: "cell-account",
511
- children: [binding.profile.startsWith("github") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitHub, { size: 15 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { size: 15 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
439
+ children: [binding.profile.startsWith("github") ? /* @__PURE__ */ jsx(GitHub, { size: 15 }) : /* @__PURE__ */ jsx(Link, { size: 15 }), /* @__PURE__ */ jsxs("span", {
512
440
  className: "cell-stack",
513
441
  children: [
514
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: binding.label ?? title }),
515
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: binding.label === null ? detail : `${title} · ${detail}` }),
516
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", {
442
+ /* @__PURE__ */ jsx("span", { children: binding.label ?? title }),
443
+ /* @__PURE__ */ jsx("small", { children: binding.label === null ? detail : `${title} · ${detail}` }),
444
+ /* @__PURE__ */ jsxs("details", {
517
445
  className: "claims",
518
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", { children: "Claims" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Claims, { binding })]
446
+ children: [/* @__PURE__ */ jsx("summary", { children: "Claims" }), /* @__PURE__ */ jsx(Claims, { binding })]
519
447
  })
520
448
  ]
521
449
  })]
522
450
  }) }),
523
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
451
+ /* @__PURE__ */ jsx("td", {
524
452
  className: "nowrap",
525
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
453
+ children: /* @__PURE__ */ jsxs("span", {
526
454
  className: "cell-stack",
527
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, { iso: binding.createdAt }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("small", { children: ["by ", binding.createdBy] })]
455
+ children: [/* @__PURE__ */ jsx(Timestamp, { iso: binding.createdAt }), /* @__PURE__ */ jsxs("small", { children: ["by ", binding.createdBy] })]
528
456
  })
529
457
  }),
530
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
458
+ /* @__PURE__ */ jsx("td", {
531
459
  className: "nowrap cell-muted",
532
- children: binding.lastUsedAt === null ? "Never" : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
460
+ children: binding.lastUsedAt === null ? "Never" : /* @__PURE__ */ jsx(Timestamp, {
533
461
  iso: binding.lastUsedAt,
534
462
  display: "relative"
535
463
  })
536
464
  }),
537
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
465
+ /* @__PURE__ */ jsx("td", {
538
466
  className: "col-actions",
539
- children: state.state === "pending" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowPending, { status: state }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmButton, {
540
- trigger: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
467
+ children: state.state === "pending" ? /* @__PURE__ */ jsx(RowPending, { status: state }) : /* @__PURE__ */ jsx(ConfirmButton, {
468
+ trigger: /* @__PURE__ */ jsxs("button", {
541
469
  className: "act",
542
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { size: 13 }), "Remove"]
470
+ children: [/* @__PURE__ */ jsx(X, { size: 13 }), "Remove"]
543
471
  }),
544
- title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
472
+ title: /* @__PURE__ */ jsxs(Fragment$1, { children: [
545
473
  "Stop trusting ",
546
474
  binding.label ?? title,
547
475
  "?"
@@ -552,7 +480,7 @@ function TrustedWorkloads({ serviceId, bindings }) {
552
480
  })
553
481
  })
554
482
  ]
555
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowFailure, {
483
+ }), /* @__PURE__ */ jsx(RowFailure, {
556
484
  status: state,
557
485
  columns: 4,
558
486
  onDismiss: () => state.state === "failed" && dismiss(state.mutationId)
@@ -563,21 +491,21 @@ function TrustedWorkloads({ serviceId, bindings }) {
563
491
  });
564
492
  }
565
493
  function Claims({ binding }) {
566
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", {
494
+ return /* @__PURE__ */ jsx("table", {
567
495
  className: "claims-table",
568
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tbody", { children: [
569
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "iss" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
496
+ children: /* @__PURE__ */ jsxs("tbody", { children: [
497
+ /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", { children: "iss" }), /* @__PURE__ */ jsx("td", {
570
498
  className: "mono",
571
499
  children: binding.issuer
572
500
  })] }),
573
- Object.entries(binding.claims).map(([name, value]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
501
+ Object.entries(binding.claims).map(([name, value]) => /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
574
502
  className: "mono",
575
503
  children: name
576
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
504
+ }), /* @__PURE__ */ jsx("td", {
577
505
  className: "mono",
578
506
  children: value
579
507
  })] }, name)),
580
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "keys" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
508
+ /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", { children: "keys" }), /* @__PURE__ */ jsx("td", {
581
509
  className: "mono",
582
510
  children: binding.jwksUri
583
511
  })] })
@@ -585,9 +513,9 @@ function Claims({ binding }) {
585
513
  });
586
514
  }
587
515
  function TrustWorkload({ serviceId }) {
588
- const [open, setOpen] = (0, import_react.useState)(false);
589
- const [form, setForm] = (0, import_react.useState)(EMPTY_FORM);
590
- const [plan, setPlan] = (0, import_react.useState)(null);
516
+ const [open, setOpen] = useState(false);
517
+ const [form, setForm] = useState(EMPTY_FORM);
518
+ const [plan, setPlan] = useState(null);
591
519
  const coffre = useCoffre();
592
520
  const member = memberRef("service", serviceId);
593
521
  const { pending, error, setError, run } = useAction();
@@ -624,104 +552,104 @@ function TrustWorkload({ serviceId }) {
624
552
  onSuccess: setPlan
625
553
  });
626
554
  }
627
- const field = (label, key, props = {}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
555
+ const field = (label, key, props = {}) => /* @__PURE__ */ jsxs("label", {
628
556
  className: "field",
629
557
  children: [
630
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
558
+ /* @__PURE__ */ jsx("span", {
631
559
  className: "label",
632
560
  children: label
633
561
  }),
634
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
562
+ /* @__PURE__ */ jsx("input", {
635
563
  className: `input${props.mono ? " mono" : ""}`,
636
564
  value: form[key],
637
565
  placeholder: props.placeholder,
638
566
  onChange: (event) => set({ [key]: event.target.value })
639
567
  }),
640
- props.hint !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
568
+ props.hint !== void 0 && /* @__PURE__ */ jsx("span", {
641
569
  className: "hint",
642
570
  children: props.hint
643
571
  })
644
572
  ]
645
573
  });
646
- const ref = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
574
+ const ref = /* @__PURE__ */ jsxs("div", {
647
575
  className: "form-row",
648
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
576
+ children: [/* @__PURE__ */ jsxs("label", {
649
577
  className: "field",
650
578
  style: { flex: "0 0 8rem" },
651
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
579
+ children: [/* @__PURE__ */ jsx("span", {
652
580
  className: "label",
653
581
  children: "At"
654
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", {
582
+ }), /* @__PURE__ */ jsxs("select", {
655
583
  className: "select",
656
584
  value: form.refKind,
657
585
  onChange: (event) => set({ refKind: event.target.value }),
658
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
586
+ children: [/* @__PURE__ */ jsx("option", {
659
587
  value: "branch",
660
588
  children: "Branch"
661
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
589
+ }), /* @__PURE__ */ jsx("option", {
662
590
  value: "tag",
663
591
  children: "Tag"
664
592
  })]
665
593
  })]
666
594
  }), field(form.refKind === "branch" ? "Branch" : "Tag", "refName", { mono: true })]
667
595
  });
668
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
596
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("button", {
669
597
  className: "btn btn-sm",
670
598
  onClick: () => setOpen(true),
671
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Plus, { size: 14 }), "Trust a workload"]
672
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modal, {
599
+ children: [/* @__PURE__ */ jsx(Plus, { size: 14 }), "Trust a workload"]
600
+ }), /* @__PURE__ */ jsx(Modal, {
673
601
  open,
674
602
  onOpenChange: (next) => next ? setOpen(true) : close(),
675
603
  title: plan === null ? "Trust a workload" : "Review the binding",
676
- children: plan === null ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
604
+ children: plan === null ? /* @__PURE__ */ jsxs("form", {
677
605
  className: "form",
678
606
  onSubmit: (event) => {
679
607
  event.preventDefault();
680
608
  review();
681
609
  },
682
610
  children: [
683
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", {
611
+ /* @__PURE__ */ jsx("nav", {
684
612
  className: "segmented",
685
613
  "aria-label": "Platform",
686
614
  children: [
687
615
  "github",
688
616
  "gitlab",
689
617
  "other"
690
- ].map((platform) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
618
+ ].map((platform) => /* @__PURE__ */ jsx("button", {
691
619
  type: "button",
692
620
  "aria-pressed": form.platform === platform,
693
621
  onClick: () => set({ platform }),
694
622
  children: platform === "github" ? "GitHub Actions" : platform === "gitlab" ? "GitLab" : "Other issuer"
695
623
  }, platform))
696
624
  }),
697
- form.platform === "github" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
698
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", {
625
+ form.platform === "github" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
626
+ /* @__PURE__ */ jsxs("nav", {
699
627
  className: "segmented",
700
628
  "aria-label": "Workflow",
701
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
629
+ children: [/* @__PURE__ */ jsx("button", {
702
630
  type: "button",
703
631
  "aria-pressed": !form.reusable,
704
632
  onClick: () => set({ reusable: false }),
705
633
  children: "A workflow of the repository"
706
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
634
+ }), /* @__PURE__ */ jsx("button", {
707
635
  type: "button",
708
636
  "aria-pressed": form.reusable,
709
637
  onClick: () => set({ reusable: true }),
710
638
  children: "A reusable workflow"
711
639
  })]
712
640
  }),
713
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
641
+ /* @__PURE__ */ jsxs("div", {
714
642
  className: "form-row",
715
643
  children: [field("Repository", "repository", {
716
644
  placeholder: "acme/api",
717
645
  mono: true
718
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
646
+ }), /* @__PURE__ */ jsx("div", {
719
647
  className: "field",
720
648
  style: {
721
649
  flex: "0 0 auto",
722
650
  alignSelf: "end"
723
651
  },
724
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
652
+ children: /* @__PURE__ */ jsxs("button", {
725
653
  className: "btn",
726
654
  type: "button",
727
655
  disabled: lookup.pending || form.repository.trim() === "",
@@ -732,20 +660,20 @@ function TrustWorkload({ serviceId }) {
732
660
  ownerId: ids.ownerId
733
661
  })
734
662
  }),
735
- children: [lookup.pending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), "Look up IDs"]
663
+ children: [lookup.pending && /* @__PURE__ */ jsx(Spinner, {}), "Look up IDs"]
736
664
  })
737
665
  })]
738
666
  }),
739
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
667
+ /* @__PURE__ */ jsxs("div", {
740
668
  className: "form-row",
741
669
  children: [!(form.reusable && form.anyRepository) && field("Repository ID", "repositoryId", { mono: true }), field("Owner ID", "ownerId", { mono: true })]
742
670
  }),
743
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
671
+ /* @__PURE__ */ jsxs("p", {
744
672
  className: "hint",
745
673
  children: [
746
674
  "Bindings name IDs, which unlike names nobody else can take over. For a private repository:",
747
675
  " ",
748
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
676
+ /* @__PURE__ */ jsxs("span", {
749
677
  className: "mono",
750
678
  children: [
751
679
  "gh api repos/",
@@ -755,8 +683,8 @@ function TrustWorkload({ serviceId }) {
755
683
  })
756
684
  ]
757
685
  }),
758
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: lookup.error }),
759
- form.reusable ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
686
+ /* @__PURE__ */ jsx(ErrorLine, { error: lookup.error }),
687
+ form.reusable ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
760
688
  field("Called workflow", "called", {
761
689
  placeholder: "acme/deploy/.github/workflows/release.yml@refs/heads/main",
762
690
  mono: true
@@ -771,9 +699,9 @@ function TrustWorkload({ serviceId }) {
771
699
  mono: true,
772
700
  hint: "Left out, every workflow of the repository at the ref below may call it."
773
701
  }),
774
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
702
+ /* @__PURE__ */ jsxs("label", {
775
703
  className: "check",
776
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
704
+ children: [/* @__PURE__ */ jsx("input", {
777
705
  type: "checkbox",
778
706
  checked: form.anyRepository,
779
707
  onChange: (event) => set({ anyRepository: event.target.checked })
@@ -783,23 +711,23 @@ function TrustWorkload({ serviceId }) {
783
711
  placeholder: "deploy.yml",
784
712
  mono: true
785
713
  }),
786
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
714
+ /* @__PURE__ */ jsxs("label", {
787
715
  className: "field",
788
716
  children: [
789
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
717
+ /* @__PURE__ */ jsx("span", {
790
718
  className: "label",
791
719
  children: "Event"
792
720
  }),
793
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("select", {
721
+ /* @__PURE__ */ jsx("select", {
794
722
  className: "select",
795
723
  value: form.event,
796
724
  onChange: (event) => set({ event: event.target.value }),
797
- children: GITHUB_EVENTS.map((event) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
725
+ children: GITHUB_EVENTS.map((event) => /* @__PURE__ */ jsx("option", {
798
726
  value: event,
799
727
  children: event
800
728
  }, event))
801
729
  }),
802
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
730
+ /* @__PURE__ */ jsx("span", {
803
731
  className: "hint",
804
732
  children: "Pull requests and workflow_run are never trusted: their runs can carry a stranger's code."
805
733
  })
@@ -807,23 +735,23 @@ function TrustWorkload({ serviceId }) {
807
735
  }),
808
736
  ref
809
737
  ] }),
810
- form.platform === "gitlab" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
738
+ form.platform === "gitlab" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
811
739
  field("GitLab", "gitlabUrl", {
812
740
  placeholder: "https://gitlab.com",
813
741
  hint: "Left empty, gitlab.com."
814
742
  }),
815
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
743
+ /* @__PURE__ */ jsxs("div", {
816
744
  className: "form-row",
817
745
  children: [field("Project", "project", {
818
746
  placeholder: "acme/api",
819
747
  mono: true
820
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
748
+ }), /* @__PURE__ */ jsx("div", {
821
749
  className: "field",
822
750
  style: {
823
751
  flex: "0 0 auto",
824
752
  alignSelf: "end"
825
753
  },
826
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
754
+ children: /* @__PURE__ */ jsxs("button", {
827
755
  className: "btn",
828
756
  type: "button",
829
757
  disabled: lookup.pending || form.project.trim() === "",
@@ -837,58 +765,58 @@ function TrustWorkload({ serviceId }) {
837
765
  namespaceId: ids.namespaceId
838
766
  })
839
767
  }),
840
- children: [lookup.pending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), "Look up IDs"]
768
+ children: [lookup.pending && /* @__PURE__ */ jsx(Spinner, {}), "Look up IDs"]
841
769
  })
842
770
  })]
843
771
  }),
844
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
772
+ /* @__PURE__ */ jsxs("div", {
845
773
  className: "form-row",
846
774
  children: [field("Project ID", "projectId", { mono: true }), field("Namespace ID", "namespaceId", { mono: true })]
847
775
  }),
848
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: lookup.error }),
776
+ /* @__PURE__ */ jsx(ErrorLine, { error: lookup.error }),
849
777
  ref,
850
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
778
+ /* @__PURE__ */ jsxs("label", {
851
779
  className: "field",
852
780
  children: [
853
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
781
+ /* @__PURE__ */ jsx("span", {
854
782
  className: "label",
855
783
  children: "Pipeline source"
856
784
  }),
857
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("select", {
785
+ /* @__PURE__ */ jsx("select", {
858
786
  className: "select",
859
787
  value: form.source,
860
788
  onChange: (event) => set({ source: event.target.value }),
861
- children: GITLAB_PIPELINE_SOURCES.map((source) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
789
+ children: GITLAB_PIPELINE_SOURCES.map((source) => /* @__PURE__ */ jsx("option", {
862
790
  value: source,
863
791
  children: source
864
792
  }, source))
865
793
  }),
866
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
794
+ /* @__PURE__ */ jsx("span", {
867
795
  className: "hint",
868
796
  children: "Merge-request pipelines are never trusted: they name another project."
869
797
  })
870
798
  ]
871
799
  })
872
800
  ] }),
873
- form.platform === "other" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
801
+ form.platform === "other" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
874
802
  field("Issuer", "issuer", { placeholder: "https://accounts.google.com" }),
875
803
  field("Subject (sub)", "sub", {
876
804
  mono: true,
877
805
  hint: "You vouch for what this issuer's subject means: a Google service account's unique ID, say."
878
806
  }),
879
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
807
+ /* @__PURE__ */ jsxs("label", {
880
808
  className: "field",
881
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
809
+ children: [/* @__PURE__ */ jsxs("span", {
882
810
  className: "label",
883
811
  children: [
884
812
  "Other claims, one ",
885
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
813
+ /* @__PURE__ */ jsx("span", {
886
814
  className: "mono",
887
815
  children: "name=value"
888
816
  }),
889
817
  " a line"
890
818
  ]
891
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", {
819
+ }), /* @__PURE__ */ jsx("textarea", {
892
820
  className: "input mono",
893
821
  rows: 3,
894
822
  value: form.extra,
@@ -897,35 +825,35 @@ function TrustWorkload({ serviceId }) {
897
825
  })
898
826
  ] }),
899
827
  field("Label (optional)", "label", { placeholder: "Deploys to production" }),
900
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error }),
901
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
828
+ /* @__PURE__ */ jsx(ErrorLine, { error }),
829
+ /* @__PURE__ */ jsxs("div", {
902
830
  className: "dialog-actions",
903
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
831
+ children: [/* @__PURE__ */ jsx("button", {
904
832
  className: "btn",
905
833
  type: "button",
906
834
  onClick: close,
907
835
  children: "Cancel"
908
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
836
+ }), /* @__PURE__ */ jsxs("button", {
909
837
  className: "btn btn-primary",
910
838
  type: "submit",
911
839
  disabled: pending,
912
- children: [pending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), "Review"]
840
+ children: [pending && /* @__PURE__ */ jsx(Spinner, {}), "Review"]
913
841
  })]
914
842
  })
915
843
  ]
916
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
844
+ }) : /* @__PURE__ */ jsxs("div", {
917
845
  className: "form",
918
846
  children: [
919
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
847
+ /* @__PURE__ */ jsxs("p", { children: [
920
848
  "Runs whose ID token carries exactly these claims will sign in as ",
921
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
849
+ /* @__PURE__ */ jsx("span", {
922
850
  className: "mono",
923
851
  children: member
924
852
  }),
925
853
  ", and read what it may read."
926
854
  ] }),
927
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Claims, { binding: plan }),
928
- plan.replaces.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Notice, {
855
+ /* @__PURE__ */ jsx(Claims, { binding: plan }),
856
+ plan.replaces.length > 0 && /* @__PURE__ */ jsxs(Notice, {
929
857
  tone: "info",
930
858
  children: [
931
859
  "This replaces ",
@@ -934,15 +862,15 @@ function TrustWorkload({ serviceId }) {
934
862
  "."
935
863
  ]
936
864
  }),
937
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error }),
938
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
865
+ /* @__PURE__ */ jsx(ErrorLine, { error }),
866
+ /* @__PURE__ */ jsxs("div", {
939
867
  className: "dialog-actions",
940
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
868
+ children: [/* @__PURE__ */ jsx("button", {
941
869
  className: "btn",
942
870
  type: "button",
943
871
  onClick: () => setPlan(null),
944
872
  children: "Back"
945
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
873
+ }), /* @__PURE__ */ jsxs("button", {
946
874
  className: "btn btn-primary",
947
875
  type: "button",
948
876
  disabled: pending,
@@ -950,7 +878,7 @@ function TrustWorkload({ serviceId }) {
950
878
  affects: affects.bindings(member),
951
879
  onSuccess: close
952
880
  }),
953
- children: [pending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), "Save binding"]
881
+ children: [pending && /* @__PURE__ */ jsx(Spinner, {}), "Save binding"]
954
882
  })]
955
883
  })
956
884
  ]
@@ -958,7 +886,8 @@ function TrustWorkload({ serviceId }) {
958
886
  })] });
959
887
  }
960
888
  //#endregion
961
- //#region src/routes/tokens.$token.tsx?tsr-split=component
889
+ //#region src/pages/token.tsx
890
+ var Route = pageRoute();
962
891
  function TokenPage() {
963
892
  const { token } = Route.useParams();
964
893
  const client = useCoffre();
@@ -969,20 +898,22 @@ function TokenPage() {
969
898
  const { data: credentials } = useSuspenseQuery(queries.credentials(client, member, owner && auth.signin !== null));
970
899
  const { data: bindings } = useSuspenseQuery(queries.bindings(client, member, owner && auth.signin !== null));
971
900
  const active = report?.ok === true && report.report?.status === "active";
972
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
973
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrincipalPage, {
901
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
902
+ /* @__PURE__ */ jsx(PrincipalPage, {
974
903
  principalType: "service",
975
904
  principalId: token
976
905
  }),
977
- active && credentials?.ok === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServiceTokens, {
906
+ active && credentials?.ok === true && /* @__PURE__ */ jsx(ServiceTokens, {
978
907
  serviceId: token,
979
908
  tokens: credentials.tokens
980
909
  }),
981
- active && bindings?.ok === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TrustedWorkloads, {
910
+ active && bindings?.ok === true && /* @__PURE__ */ jsx(TrustedWorkloads, {
982
911
  serviceId: token,
983
912
  bindings: bindings.bindings
984
913
  })
985
914
  ] });
986
915
  }
987
916
  //#endregion
988
- export { TokenPage as component };
917
+ export { TokenPage };
918
+
919
+ //# sourceMappingURL=token.js.map