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