@coffre/ui 0.1.11 → 0.1.12

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 (122) hide show
  1. package/dist/client/_coffre/assets/account-CyJDFhek.js +2 -0
  2. package/dist/client/_coffre/assets/account-DHSs5h2f.js +1 -0
  3. package/dist/client/_coffre/assets/affordances-BQD5B421.js +1 -0
  4. package/dist/client/_coffre/assets/audit-Bcyp_dU1.js +2 -0
  5. package/dist/client/_coffre/assets/audit-rMy9mU9Q.js +1 -0
  6. package/dist/client/_coffre/assets/auth.device-DuvaComb.js +1 -0
  7. package/dist/client/_coffre/assets/{auth.device-CWHNQn9W.js → auth.device-yBt_sLZW.js} +2 -2
  8. package/dist/client/_coffre/assets/directory-C4BMGC7-.js +1 -0
  9. package/dist/client/_coffre/assets/dist-BNkBTkxj.js +1 -0
  10. package/dist/client/_coffre/assets/{globals-CKBoTlyH.css → globals-BJkzu6T5.css} +1 -1
  11. package/dist/client/_coffre/assets/{grants-CjoOnxzz.js → grants-CyDW25eX.js} +1 -1
  12. package/dist/client/_coffre/assets/icons-BRl8DlXW.js +1 -0
  13. package/dist/client/_coffre/assets/{index-CUGytaO3.js → index-CA1mtrIx.js} +5 -5
  14. package/dist/client/_coffre/assets/link-CqlAJWBd.js +1 -0
  15. package/dist/client/_coffre/assets/login-B73b6bsJ.js +1 -0
  16. package/dist/client/_coffre/assets/login-BO1KAGPU.js +2 -0
  17. package/dist/client/_coffre/assets/offboarding--5vSKNHv.js +1 -0
  18. package/dist/client/_coffre/assets/page-Dngv8FMr.js +1 -0
  19. package/dist/client/_coffre/assets/preload-helper-DBha3tys.js +1 -0
  20. package/dist/client/_coffre/assets/principal-page-C4qDD-d8.js +1 -0
  21. package/dist/client/_coffre/assets/projects._project._environment-eBKxOZ0_.js +2 -0
  22. package/dist/client/_coffre/assets/projects._project._environment-or_AX6o5.js +3 -0
  23. package/dist/client/_coffre/assets/projects._project.index-DHdXfEh-.js +2 -0
  24. package/dist/client/_coffre/assets/projects._project.index-iynQgenH.js +1 -0
  25. package/dist/client/_coffre/assets/projects.index-CGW8mRil.js +1 -0
  26. package/dist/client/_coffre/assets/row-state-BlarvG7E.js +1 -0
  27. package/dist/client/_coffre/assets/{settings-D2zp1Ssu.js → settings-D-7RJIDf.js} +1 -1
  28. package/dist/client/_coffre/assets/suspense-q_eJaZ18.js +1 -0
  29. package/dist/client/_coffre/assets/tokens._token-0u7midqA.js +2 -0
  30. package/dist/client/_coffre/assets/tokens._token-C53NqScg.js +1 -0
  31. package/dist/client/_coffre/assets/{tokens.index-CSi5Wxwf.js → tokens.index-DBZTLnbi.js} +1 -1
  32. package/dist/client/_coffre/assets/{ui-BdipqGpP.js → ui-BPWFJNz7.js} +3 -3
  33. package/dist/client/_coffre/assets/{unregistered-CA7B4C1m.js → unregistered-CLhgtwUt.js} +1 -1
  34. package/dist/client/_coffre/assets/use-action-LULgF26O.js +1 -0
  35. package/dist/client/_coffre/assets/{use-change-BRRMJocl.js → use-change-Bd6NZJj9.js} +1 -1
  36. package/dist/client/_coffre/assets/use-shell-Dx92Huhb.js +1 -0
  37. package/dist/client/_coffre/assets/useQuery-BIIZz1CB.js +1 -0
  38. package/dist/client/_coffre/assets/useSuspenseQuery-tP9HFZ8w.js +1 -0
  39. package/dist/client/_coffre/assets/users._user-BXtaL8Ee.js +2 -0
  40. package/dist/client/_coffre/assets/users._user-CNYVkXaY.js +1 -0
  41. package/dist/client/_coffre/assets/{users.index-CKnQ1G76.js → users.index-Cs9tibIv.js} +1 -1
  42. package/dist/server/.vite/manifest.json +205 -206
  43. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-T9tMsCwo.js +162 -0
  44. package/dist/server/_coffre/assets/{account-BocTPU1J.js → account-BUhhOS5-.js} +8 -8
  45. package/dist/server/_coffre/assets/{account-CL8hOGhO.js → account-B_h55GCs.js} +4 -4
  46. package/dist/server/_coffre/assets/{audit-Bcka4vA6.js → audit-B8Ck358-.js} +6 -6
  47. package/dist/server/_coffre/assets/{audit-CSRQYIhu.js → audit-DFsXfeAQ.js} +2 -2
  48. package/dist/server/_coffre/assets/{auth.device-DqO0T-rU.js → auth.device-BXf_JjT7.js} +2 -2
  49. package/dist/server/_coffre/assets/{auth.device-CMcUISZY.js → auth.device-cqjWACvB.js} +4 -4
  50. package/dist/server/_coffre/assets/{directory-CyYx6Jx1.js → directory-C9SfNgpM.js} +5 -5
  51. package/dist/server/_coffre/assets/{globals-CKBoTlyH.css → globals-BJkzu6T5.css} +1 -1
  52. package/dist/server/_coffre/assets/{grants-CRijabX0.js → grants--315KmXu.js} +5 -5
  53. package/dist/server/_coffre/assets/{icons-Dy-5ccDF.js → icons-CWsTEfpn.js} +123 -241
  54. package/dist/server/_coffre/assets/{login-BI9tzJEy.js → login-CQSkYW_D.js} +5 -5
  55. package/dist/server/_coffre/assets/{login-C-v88YwP.js → login-LBpXXfsQ.js} +1 -1
  56. package/dist/server/_coffre/assets/{offboarding-1H0LavTd.js → offboarding-CykelNis.js} +9 -79
  57. package/dist/server/_coffre/assets/{page-D_mO0-sn.js → page-BGeDoQO5.js} +3 -64
  58. package/dist/server/_coffre/assets/{principal-page-DQDoXute.js → principal-page-CRdoAQOq.js} +11 -11
  59. package/dist/server/_coffre/assets/{projects._project._environment-D_5R40of.js → projects._project._environment-BXU1Mee5.js} +3 -3
  60. package/dist/server/_coffre/assets/{projects._project._environment-C-yVwC92.js → projects._project._environment-BrDqn8kW.js} +11 -550
  61. package/dist/server/_coffre/assets/{projects._project.index-A2BImFIT.js → projects._project.index-CAxBU4tY.js} +12 -12
  62. package/dist/server/_coffre/assets/{projects._project.index-BPPKxKrt.js → projects._project.index-CYyUVTCl.js} +2 -2
  63. package/dist/server/_coffre/assets/{projects.index-543IsPzY.js → projects.index-D6ZoDE_0.js} +7 -7
  64. package/dist/server/_coffre/assets/{router-CM3vK8QO.js → router-Bu2qtyqw.js} +20 -20
  65. package/dist/server/_coffre/assets/{row-state-XBtDoIA4.js → row-state-CAItu3n_.js} +2 -2
  66. package/dist/server/_coffre/assets/{settings-BLVU74ym.js → settings-ByeF6hBa.js} +3 -3
  67. package/dist/server/_coffre/assets/{suspense-CzYTwxOj.js → suspense-beD01bb8.js} +1 -1
  68. package/dist/server/_coffre/assets/{tokens._token-B-hBgwBW.js → tokens._token-CM01QPCq.js} +2 -2
  69. package/dist/server/_coffre/assets/{tokens._token-aubAUonP.js → tokens._token-D2E4P3Qc.js} +10 -10
  70. package/dist/server/_coffre/assets/{tokens.index-4D3jwp5v.js → tokens.index-Cmrgn3mU.js} +6 -6
  71. package/dist/server/_coffre/assets/{ui-BI3Bf72q.js → ui-DvlGkmaH.js} +1 -1
  72. package/dist/server/_coffre/assets/{unregistered-CagDxMyw.js → unregistered-DSArejP9.js} +3 -3
  73. package/dist/server/_coffre/assets/{use-action-tzBZvjjQ.js → use-action-C2wz34kq.js} +2 -2
  74. package/dist/server/_coffre/assets/{use-change-Dggqxy5y.js → use-change-CJpGSNIq.js} +3 -3
  75. package/dist/server/_coffre/assets/{use-shell-CwStDfzX.js → use-shell-C3iYcyP1.js} +2 -2
  76. package/dist/server/_coffre/assets/{useQuery-C6_dBjem.js → useQuery-ChxaQ4Cb.js} +2 -2
  77. package/dist/server/_coffre/assets/{useSuspenseQuery-BuapQt_P.js → useSuspenseQuery-BjAmlGZl.js} +2 -2
  78. package/dist/server/_coffre/assets/{users._user-C252Iilj.js → users._user-BVeR9fZP.js} +2 -2
  79. package/dist/server/_coffre/assets/{users._user-137WNyxn.js → users._user-Cih2Etf4.js} +2 -2
  80. package/dist/server/_coffre/assets/{users.index-DQHsfnal.js → users.index-Bo2_a95G.js} +6 -6
  81. package/dist/server/index.js +2 -2
  82. package/package.json +3 -3
  83. package/src/components/icons.tsx +0 -34
  84. package/src/components/offboarding.tsx +1 -52
  85. package/src/lib/coffre.ts +1 -1
  86. package/src/lib/queries.ts +2 -10
  87. package/src/routes/projects.$project.$environment.tsx +1 -11
  88. package/src/shared/models.ts +1 -5
  89. package/src/styles/globals.css +2 -49
  90. package/dist/client/_coffre/assets/account-BJAdDvZf.js +0 -2
  91. package/dist/client/_coffre/assets/account-D0jLpk5c.js +0 -1
  92. package/dist/client/_coffre/assets/affordances-Bq2-oUB5.js +0 -1
  93. package/dist/client/_coffre/assets/audit-C-pcBgKe.js +0 -2
  94. package/dist/client/_coffre/assets/audit-CHGlDeBB.js +0 -1
  95. package/dist/client/_coffre/assets/auth.device-BndOUjse.js +0 -1
  96. package/dist/client/_coffre/assets/directory-nDExpkAz.js +0 -1
  97. package/dist/client/_coffre/assets/dist-QVHMLatb.js +0 -1
  98. package/dist/client/_coffre/assets/icons-BQ27Ds9u.js +0 -1
  99. package/dist/client/_coffre/assets/link-DP8SVWon.js +0 -1
  100. package/dist/client/_coffre/assets/login-CeaxDMcr.js +0 -2
  101. package/dist/client/_coffre/assets/login-DrMgvqZn.js +0 -1
  102. package/dist/client/_coffre/assets/offboarding-CNr_1tnl.js +0 -1
  103. package/dist/client/_coffre/assets/page-CGmvjSy4.js +0 -1
  104. package/dist/client/_coffre/assets/preload-helper-ClBkJ19f.js +0 -1
  105. package/dist/client/_coffre/assets/principal-page-DNLb_q_e.js +0 -1
  106. package/dist/client/_coffre/assets/projects._project._environment-CHzbboGp.js +0 -3
  107. package/dist/client/_coffre/assets/projects._project._environment-DDxu_HHD.js +0 -2
  108. package/dist/client/_coffre/assets/projects._project.index-CIAsjvg6.js +0 -2
  109. package/dist/client/_coffre/assets/projects._project.index-DZ9l6d-1.js +0 -1
  110. package/dist/client/_coffre/assets/projects.index-4eUXreE_.js +0 -1
  111. package/dist/client/_coffre/assets/row-state-ByET1OKX.js +0 -1
  112. package/dist/client/_coffre/assets/suspense-C7KwSnTG.js +0 -1
  113. package/dist/client/_coffre/assets/tokens._token-DWmbqzNk.js +0 -2
  114. package/dist/client/_coffre/assets/tokens._token-Dui_4KfS.js +0 -1
  115. package/dist/client/_coffre/assets/use-action-DRm9yVhV.js +0 -1
  116. package/dist/client/_coffre/assets/use-shell-BMGlJ25Q.js +0 -1
  117. package/dist/client/_coffre/assets/useQuery-D__2KBOs.js +0 -1
  118. package/dist/client/_coffre/assets/useSuspenseQuery-CSXyDALB.js +0 -1
  119. package/dist/client/_coffre/assets/users._user-BkNrX7Qf.js +0 -1
  120. package/dist/client/_coffre/assets/users._user-jbSvtdOg.js +0 -2
  121. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-Dx-c3XVk.js +0 -162
  122. package/src/components/syncs.tsx +0 -597
@@ -1,17 +1,16 @@
1
1
  import { i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
2
2
  import { t as Link } from "./link-42ZWdjzZ.js";
3
- import { C as useCoffre, G as initialValues, H as configFromForm, K as isAsked, S as uiResult, V as CoffreError, W as firstMissing, c as keys, g as refresh, h as queries, i as PageHeader, n as ClosedDoor, o as affects, q as planImport, t as Card, w as canRevealSecrets, y as failureMessage } from "./page-D_mO0-sn.js";
4
- import { f as useQueryClient } from "./suspense-CzYTwxOj.js";
5
- import { C as hasSecretEditConflict, a as archiveSecret, n as useChangeStatus, r as UnsavedEdits, t as useChange, v as restoreSecret, w as secretChangeFor, x as saveSecrets } from "./use-change-Dggqxy5y.js";
6
- import { t as useShell } from "./use-shell-CwStDfzX.js";
7
- import { t as useSuspenseQuery } from "./useSuspenseQuery-BuapQt_P.js";
3
+ import { C as useCoffre, U as planImport, V as CoffreError, c as keys, h as queries, i as PageHeader, n as ClosedDoor, o as affects, t as Card, w as canRevealSecrets, y as failureMessage } from "./page-BGeDoQO5.js";
4
+ import { C as hasSecretEditConflict, a as archiveSecret, n as useChangeStatus, r as UnsavedEdits, t as useChange, v as restoreSecret, w as secretChangeFor, x as saveSecrets } from "./use-change-CJpGSNIq.js";
5
+ import { t as useShell } from "./use-shell-C3iYcyP1.js";
6
+ import { t as useSuspenseQuery } from "./useSuspenseQuery-BjAmlGZl.js";
8
7
  import { n as toast } from "./dist-CnnV3t2g.js";
9
- import { a as ErrorLine, c as Spinner, d as Toggletip, h as dropdown_menu_exports, i as EmptyState, l as Timestamp, n as ConfirmDialog, o as Modal, p as breakAfterUnderscores, r as CopyButton, s as Notice, t as ConfirmButton, u as Tip } from "./ui-BI3Bf72q.js";
8
+ import { a as ErrorLine, c as Spinner, h as dropdown_menu_exports, i as EmptyState, l as Timestamp, o as Modal, p as breakAfterUnderscores, r as CopyButton, s as Notice, t as ConfirmButton, u as Tip } from "./ui-DvlGkmaH.js";
10
9
  import { i as SecretReadOnly } from "./affordances-CKANXDTG.js";
11
- import { A as Pencil, D as MoreHorizontal, F as Search, H as SyncMark, J as X, M as Plus, P as RotateBack, S as Lock, U as Terminal, V as Sync, W as Upload, d as Eye, f as EyeOff, g as History, h as Hash, i as Archive, j as Play, k as Pause, l as Clock, n as AlertCircle, r as AlertTriangle, v as Key } from "./icons-Dy-5ccDF.js";
12
- import { a as rowClass, i as RowPending, r as RowFailure } from "./row-state-XBtDoIA4.js";
13
- import { t as Route } from "./projects._project._environment-D_5R40of.js";
14
- import { t as useAction } from "./use-action-tzBZvjjQ.js";
10
+ import { A as Plus, B as Upload, D as MoreHorizontal, M as RotateBack, N as Search, S as Lock, W as X, d as Eye, f as EyeOff, g as History, h as Hash, i as Archive, k as Pencil, l as Clock, n as AlertCircle, v as Key, z as Terminal } from "./icons-CWsTEfpn.js";
11
+ import { a as rowClass, i as RowPending, r as RowFailure } from "./row-state-CAItu3n_.js";
12
+ import { t as Route } from "./projects._project._environment-BXU1Mee5.js";
13
+ import { t as useAction } from "./use-action-C2wz34kq.js";
15
14
  import { t as secretKeyProblem } from "./validation-BQtqPe2V.js";
16
15
  //#region ../core/dist/dotenv.js
17
16
  var KEY_RE = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/;
@@ -161,546 +160,13 @@ function unescapeDoubleQuoted(text) {
161
160
  }
162
161
  //#endregion
163
162
  //#region src/lib/reveal.ts
164
- var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
163
+ var import_react = /* @__PURE__ */ __toESM(require_react());
165
164
  function revealIsCurrent(reveal, currentVersion) {
166
165
  return reveal !== null && reveal.version === currentVersion;
167
166
  }
168
167
  //#endregion
169
- //#region src/components/syncs.tsx
170
- var import_jsx_runtime = require_jsx_runtime();
171
- /** How often the card refreshes while a run is in flight. */
172
- var RUNNING_POLL_MS = 2e3;
173
- /** How long a new sync's toast waits for its first push to end. */
174
- var FIRST_RUN_WAIT_MS = 6e4;
175
- /**
176
- * Where this environment's secrets are pushed.
177
- *
178
- * Hidden from people who can neither see a sync nor add one; everyone who can
179
- * write a secret sees them, since saving one sends it on.
180
- */
181
- function Syncs({ project, environment, canRun }) {
182
- const place = {
183
- project,
184
- environment
185
- };
186
- const { data: result } = useSuspenseQuery({
187
- ...queries.syncs(useCoffre(), place),
188
- refetchInterval: (query) => query.state.data?.ok === true && query.state.data.syncs.some((sync) => sync.running) ? RUNNING_POLL_MS : false
189
- });
190
- if (result.ok && result.syncs.length === 0 && !result.canManage) return null;
191
- const canManage = result.ok && result.canManage;
192
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
193
- labelledBy: "syncs",
194
- title: "Syncs",
195
- description: "Destinations these secrets are pushed to. A change goes out when it is saved, and every hour coffre checks each destination and repairs what drifted.",
196
- actions: canManage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AddSync, {
197
- project,
198
- environment
199
- }) : void 0,
200
- children: !result.ok ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
201
- className: "card-body",
202
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: result.error })
203
- }) : result.syncs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyState, {
204
- title: "Not synced anywhere",
205
- children: [
206
- "Push these secrets where your code runs, such as GitHub Actions or Vercel, and keep them current there. Anything else can read them with ",
207
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: "coffre run" }),
208
- "."
209
- ]
210
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
211
- className: "dt-wrap",
212
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
213
- className: "dt syncs stacks",
214
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
215
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Destination" }),
216
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
217
- className: "col-shrink",
218
- children: "Status"
219
- }),
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
221
- className: "col-shrink col-hide-narrow",
222
- children: "Token"
223
- }),
224
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
225
- className: "col-actions",
226
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
227
- className: "visually-hidden",
228
- children: "Actions"
229
- })
230
- })
231
- ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: result.syncs.map((sync) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SyncRow, {
232
- place,
233
- sync,
234
- canRun,
235
- canManage
236
- }, sync.id)) })]
237
- })
238
- })
239
- });
240
- }
241
- function SyncRow({ place, sync, canRun, canManage }) {
242
- const [removing, setRemoving] = (0, import_react.useState)(false);
243
- const coffre = useCoffre();
244
- const pushing = useAction();
245
- const managing = useAction();
246
- const pending = pushing.pending || managing.pending;
247
- const error = pushing.error ?? managing.error;
248
- function runNow() {
249
- pushing.run(() => coffre.syncs.run(sync.id), {
250
- affects: affects.syncs(place),
251
- onSuccess: (result) => announce(sync, result.outcome)
252
- });
253
- }
254
- function setPaused(paused) {
255
- managing.run(() => coffre.syncs.update(sync.id, { paused }), {
256
- affects: affects.syncs(place),
257
- onSuccess: () => toast.success(paused ? `Paused ${sync.destination}` : `Resumed ${sync.destination}`, { action: {
258
- label: "Undo",
259
- onClick: () => setPaused(!paused)
260
- } })
261
- });
262
- }
263
- const shownError = error ?? (sync.offered ? sync.lastError : null);
264
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
265
- className: shownError !== null && !sync.running ? "has-error" : void 0,
266
- children: [
267
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
268
- className: "col-destination",
269
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
270
- className: "cell-account",
271
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SyncMark, {
272
- brand: sync.brand,
273
- size: 15
274
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
275
- className: "cell-stack",
276
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: sync.providerLabel }), sync.offered ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", {
277
- className: "mono",
278
- children: sync.destination
279
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: "No longer offered by this deployment" })]
280
- })]
281
- })
282
- }),
283
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
284
- className: "nowrap col-status",
285
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
286
- className: "cell-stack",
287
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SyncState, { sync }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Counts, { sync }) })]
288
- })
289
- }),
290
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
291
- className: "col-shrink col-hide-narrow cell-mono cell-muted",
292
- children: sync.credential
293
- }),
294
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", {
295
- className: "col-actions",
296
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
297
- className: "acts",
298
- children: [canRun && !sync.paused && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
299
- className: "act",
300
- onClick: runNow,
301
- disabled: pending || sync.running || !sync.offered,
302
- title: sync.offered ? void 0 : "This deployment no longer offers this provider",
303
- children: [pushing.pending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Sync, { size: 13 }), "Run now"]
304
- }), canManage && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(dropdown_menu_exports.Root, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(dropdown_menu_exports.Trigger, {
305
- asChild: true,
306
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
307
- className: "act act-icon act-quiet",
308
- "aria-label": `More for ${sync.destination}`,
309
- disabled: pending,
310
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MoreHorizontal, { size: 16 })
311
- })
312
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(dropdown_menu_exports.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(dropdown_menu_exports.Content, {
313
- className: "menu",
314
- sideOffset: 6,
315
- align: "end",
316
- children: [
317
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(dropdown_menu_exports.Item, {
318
- className: "menu-item",
319
- onSelect: () => setPaused(!sync.paused),
320
- children: [sync.paused ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Play, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pause, { size: 14 }), sync.paused ? "Resume" : "Pause"]
321
- }),
322
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(dropdown_menu_exports.Separator, { className: "menu-sep" }),
323
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(dropdown_menu_exports.Item, {
324
- className: "menu-item menu-item-danger",
325
- onSelect: () => setRemoving(true),
326
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { size: 14 }), "Remove"]
327
- })
328
- ]
329
- }) })] })]
330
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmDialog, {
331
- open: removing,
332
- onOpenChange: setRemoving,
333
- title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
334
- "Stop syncing to ",
335
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
336
- className: "mono",
337
- children: sync.destination
338
- }),
339
- "?"
340
- ] }),
341
- body: `Nothing more is pushed to ${sync.providerLabel}. Keys coffre already pushed stay there; remove them at ${sync.providerLabel} if they should go too.`,
342
- confirmLabel: "Remove sync",
343
- onConfirm: () => managing.run(() => coffre.syncs.remove(sync.id), {
344
- affects: affects.syncs(place),
345
- onSuccess: () => toast.success(`No longer syncing to ${sync.destination}`)
346
- })
347
- })]
348
- })
349
- ]
350
- }), shownError !== null && !sync.running && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", {
351
- className: "row-error",
352
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
353
- colSpan: 4,
354
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: shownError })
355
- })
356
- })] });
357
- }
358
- /** One tag for the state that matters most right now. */
359
- function SyncState({ sync }) {
360
- if (!sync.offered) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
361
- className: "tag tag-outline",
362
- children: "Unavailable"
363
- });
364
- if (sync.running) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
365
- className: "tag tag-blue",
366
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, { size: 11 }), "Pushing"]
367
- });
368
- if (sync.paused) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
369
- className: "tag tag-outline",
370
- children: "Paused"
371
- });
372
- if (sync.lastStatus === "failed") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
373
- className: "tag tag-red",
374
- children: "Failed"
375
- });
376
- if (sync.pending > 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
377
- className: "tag tag-amber",
378
- children: [sync.pending, " pending"]
379
- });
380
- if (sync.lastStatus === "partial") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
381
- className: "tag tag-amber",
382
- children: "Partial"
383
- });
384
- if (sync.lastRunAt === null) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
385
- className: "tag",
386
- children: "Not run yet"
387
- });
388
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
389
- className: "tag tag-green",
390
- children: "In sync"
391
- });
392
- }
393
- function Counts({ sync }) {
394
- const skipped = sync.skipped.length;
395
- const parts = [];
396
- if (sync.synced > 0 || sync.pending === 0) parts.push(`${sync.synced} synced`);
397
- if (sync.pending > 0) parts.push(`${sync.pending} pending`);
398
- if (skipped > 0) parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toggletip, {
399
- label: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
400
- style: {
401
- margin: 0,
402
- paddingLeft: "1rem"
403
- },
404
- children: sync.skipped.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
405
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
406
- className: "mono",
407
- children: entry.key
408
- }),
409
- ": ",
410
- entry.reason
411
- ] }, entry.key))
412
- }),
413
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
414
- type: "button",
415
- className: "tag tag-amber tag-button",
416
- children: [
417
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTriangle, { size: 11 }),
418
- skipped,
419
- " skipped"
420
- ]
421
- })
422
- }));
423
- if (sync.lastRunAt !== null) parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
424
- iso: sync.lastRunAt,
425
- display: "relative"
426
- }));
427
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: parts.map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [index > 0 && " · ", part] }, index)) });
428
- }
429
- function announce(sync, outcome) {
430
- if (outcome.status === "busy") {
431
- toast("A run is already under way", { description: "Its result appears here when it ends." });
432
- return;
433
- }
434
- const changed = outcome.upserted.length + outcome.deleted.length;
435
- if (outcome.status === "failed") toast.error(`Could not sync to ${sync.destination}`, { description: outcome.error ?? void 0 });
436
- else if (outcome.status === "partial") toast.warning(`${outcome.failed.length} of ${changed + outcome.failed.length} changes failed`, { description: outcome.failed[0]?.message });
437
- else if (changed === 0) toast.success(`${sync.destination} was already current`);
438
- else {
439
- const parts = [outcome.upserted.length > 0 && `pushed ${outcome.upserted.length}`, outcome.deleted.length > 0 && `removed ${outcome.deleted.length}`].filter(Boolean);
440
- toast.success(`${capitalize(parts.join(", "))} to ${sync.destination}`);
441
- }
442
- }
443
- /**
444
- * A new sync pushes in the background once it is made. Say so while it does,
445
- * then say how it went: a green toast beside a row already marked Failed
446
- * would be telling two stories.
447
- */
448
- async function followFirstRun(coffre, path, sync, refresh) {
449
- const id = toast.loading(`Pushing to ${sync.destination}`, { description: "The first push is under way." });
450
- const deadline = Date.now() + FIRST_RUN_WAIT_MS;
451
- while (Date.now() < deadline) {
452
- await new Promise((resolve) => setTimeout(resolve, RUNNING_POLL_MS));
453
- const listed = await uiResult(() => coffre.syncs.list(path));
454
- const now = listed.ok ? listed.syncs.find((other) => other.id === sync.id) : void 0;
455
- if (now === void 0 || now.running || now.lastRunAt === null) continue;
456
- await refresh();
457
- if (now.lastStatus === "failed") toast.error(`Could not sync to ${sync.destination}`, {
458
- id,
459
- description: now.lastError ?? void 0
460
- });
461
- else if (now.lastStatus === "partial") toast.warning(`Synced to ${sync.destination}, but not every key`, {
462
- id,
463
- description: now.lastError ?? void 0
464
- });
465
- else toast.success(`Synced to ${sync.destination}`, {
466
- id,
467
- description: `${now.synced} ${now.synced === 1 ? "key is" : "keys are"} there now.`
468
- });
469
- return;
470
- }
471
- await refresh();
472
- toast(`Still pushing to ${sync.destination}`, {
473
- id,
474
- description: "Its result appears in the list when it ends."
475
- });
476
- }
477
- function capitalize(text) {
478
- return text.charAt(0).toUpperCase() + text.slice(1);
479
- }
480
- function AddSync({ project, environment }) {
481
- const [open, setOpen] = (0, import_react.useState)(false);
482
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
483
- className: "btn btn-sm",
484
- onClick: () => setOpen(true),
485
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Plus, { size: 14 }), "Add sync"]
486
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modal, {
487
- open,
488
- onOpenChange: setOpen,
489
- title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["Sync ", /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
490
- className: "mono",
491
- children: [
492
- project,
493
- "/",
494
- environment
495
- ]
496
- })] }),
497
- description: "Every key in this environment is pushed to the destination and kept current. coffre only ever removes keys it pushed itself.",
498
- wide: true,
499
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SyncProviders, { children: (providers) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AddSyncForm, {
500
- project,
501
- environment,
502
- providers,
503
- onDone: () => setOpen(false)
504
- }) })
505
- })] });
506
- }
507
- /** Where this instance can sync to, as the deployment lists it. */
508
- function SyncProviders({ children }) {
509
- const coffre = useCoffre();
510
- const [offered, setOffered] = (0, import_react.useState)(null);
511
- (0, import_react.useEffect)(() => {
512
- let live = true;
513
- uiResult(() => coffre.syncs.providers()).then((result) => {
514
- if (live) setOffered(result);
515
- });
516
- return () => {
517
- live = false;
518
- };
519
- }, [coffre]);
520
- if (offered === null) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
521
- className: "picker-empty sync-providers-state",
522
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, { size: 13 }), "Loading where coffre can sync to…"]
523
- });
524
- if (!offered.ok) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
525
- className: "sync-providers-state",
526
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: offered.error })
527
- });
528
- if (offered.providers.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
529
- className: "picker-empty sync-providers-state",
530
- children: [
531
- "This instance offers nowhere to sync to. Whoever runs coffre lists the providers in its",
532
- " ",
533
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
534
- className: "mono",
535
- children: "syncs"
536
- }),
537
- " settings."
538
- ]
539
- });
540
- return children(offered.providers);
541
- }
542
- function AddSyncForm({ project, environment, providers, onDone }) {
543
- const [provider, setProvider] = (0, import_react.useState)(providers[0]);
544
- const [values, setValues] = (0, import_react.useState)(() => initialValues(providers[0]));
545
- const [credential, setCredential] = (0, import_react.useState)("");
546
- const coffre = useCoffre();
547
- const queryClient = useQueryClient();
548
- const { pending, error, setError, run } = useAction();
549
- const missing = firstMissing(provider, values);
550
- function pick(next) {
551
- setProvider(next);
552
- setValues(initialValues(next));
553
- setError(null);
554
- }
555
- function set(name, value) {
556
- setValues((current) => ({
557
- ...current,
558
- [name]: value
559
- }));
560
- }
561
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
562
- className: "form",
563
- style: { marginTop: "1.25rem" },
564
- onSubmit: (event) => {
565
- event.preventDefault();
566
- run(() => coffre.syncs.add(`${project}/${environment}`, {
567
- provider: provider.id,
568
- config: configFromForm(provider, values),
569
- credential: credential.trim()
570
- }), {
571
- affects: affects.syncs({
572
- project,
573
- environment
574
- }),
575
- onSuccess: (sync) => {
576
- onDone();
577
- followFirstRun(coffre, `${project}/${environment}`, sync, () => refresh(queryClient, affects.syncs({
578
- project,
579
- environment
580
- })));
581
- }
582
- });
583
- },
584
- children: [
585
- providers.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
586
- className: "choice-grid sync-providers",
587
- role: "group",
588
- "aria-label": "Destination",
589
- children: providers.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
590
- type: "button",
591
- className: "choice",
592
- "aria-pressed": option.id === provider.id,
593
- onClick: () => pick(option),
594
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SyncMark, { brand: option.brand }), option.label]
595
- }, option.id))
596
- }),
597
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
598
- className: "form-row",
599
- children: provider.fields.map((field) => {
600
- if (!isAsked(field, values)) return null;
601
- if (field.type === "text") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
602
- className: "field",
603
- children: [
604
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
605
- className: "label",
606
- children: [field.label, field.optional === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
607
- className: "hint",
608
- children: " (optional)"
609
- })]
610
- }),
611
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
612
- className: "input input-mono",
613
- value: values[field.name],
614
- placeholder: field.placeholder,
615
- spellCheck: false,
616
- autoComplete: "off",
617
- onChange: (event) => set(field.name, event.target.value)
618
- }),
619
- field.hint !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
620
- className: "hint",
621
- children: field.hint
622
- })
623
- ]
624
- }, `${provider.id}.${field.name}`);
625
- const picked = values[field.name];
626
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
627
- className: "field field-options",
628
- role: "group",
629
- "aria-label": field.label,
630
- children: [
631
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
632
- className: "label",
633
- children: field.label
634
- }),
635
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
636
- className: "segmented",
637
- children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
638
- type: "button",
639
- "aria-pressed": picked.includes(option.value),
640
- onClick: () => set(field.name, !field.multiple ? [option.value] : picked.includes(option.value) ? picked.filter((value) => value !== option.value) : [...picked, option.value]),
641
- children: option.label
642
- }, option.value))
643
- }),
644
- field.hint !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
645
- className: "hint",
646
- children: field.hint
647
- })
648
- ]
649
- }, `${provider.id}.${field.name}`);
650
- })
651
- }),
652
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
653
- className: "field",
654
- children: [
655
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
656
- className: "label",
657
- children: "Token"
658
- }),
659
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
660
- className: "input input-mono",
661
- value: credential,
662
- placeholder: provider.credential.placeholder,
663
- spellCheck: false,
664
- autoComplete: "off",
665
- onChange: (event) => setCredential(event.target.value)
666
- }),
667
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
668
- className: "hint",
669
- children: [
670
- "The secret that holds it, as ",
671
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: "project/environment/KEY" }),
672
- ". An environment of its own, such as ",
673
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: "ops/sync" }),
674
- ", keeps it from everyone who reads these secrets. You need read access to it."
675
- ]
676
- })
677
- ]
678
- }),
679
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Notice, {
680
- tone: "info",
681
- children: provider.credential.hint
682
- }),
683
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error }),
684
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
685
- className: "dialog-actions",
686
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
687
- className: "btn",
688
- type: "button",
689
- onClick: onDone,
690
- children: "Cancel"
691
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
692
- className: "btn btn-primary",
693
- type: "submit",
694
- disabled: pending || missing !== null || credential.trim() === "",
695
- title: missing !== null ? `${missing} is required` : void 0,
696
- children: [pending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), "Start syncing"]
697
- })]
698
- })
699
- ]
700
- });
701
- }
702
- //#endregion
703
168
  //#region src/routes/projects.$project.$environment.tsx?tsr-split=component
169
+ var import_jsx_runtime = require_jsx_runtime();
704
170
  /**
705
171
  * How long a revealed value stays on screen.
706
172
  *
@@ -1094,11 +560,6 @@ function EnvironmentLedger({ project, environment, permissions, keys: keys$1 })
1094
560
  })
1095
561
  })
1096
562
  }),
1097
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Syncs, {
1098
- project,
1099
- environment,
1100
- canRun: canWrite || permissions.includes("environment.manage")
1101
- }),
1102
563
  archived.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
1103
564
  labelledBy: "archived-secrets",
1104
565
  title: "Archived",
@@ -1,20 +1,20 @@
1
1
  import { i as require_react, r as require_jsx_runtime, s as __toESM, t as useRouter } from "./useRouter-CaUSUNsw.js";
2
2
  import { t as Link } from "./link-42ZWdjzZ.js";
3
- import { C as useCoffre, c as keys, h as queries, i as PageHeader, m as projectOf, n as ClosedDoor, o as affects, t as Card } from "./page-D_mO0-sn.js";
4
- import { D as projectAccessOptions, E as projectAccessLabel, T as parseProjectAccess, _ as renameEnvironment, d as environmentId, f as grantAccess, i as archiveEnvironment, n as useChangeStatus, p as grantId, s as createEnvironment, t as useChange } from "./use-change-Dggqxy5y.js";
5
- import { t as useShell } from "./use-shell-CwStDfzX.js";
6
- import { t as useSuspenseQuery } from "./useSuspenseQuery-BuapQt_P.js";
7
- import { t as useQuery } from "./useQuery-C6_dBjem.js";
3
+ import { C as useCoffre, c as keys, h as queries, i as PageHeader, m as projectOf, n as ClosedDoor, o as affects, t as Card } from "./page-BGeDoQO5.js";
4
+ import { D as projectAccessOptions, E as projectAccessLabel, T as parseProjectAccess, _ as renameEnvironment, d as environmentId, f as grantAccess, i as archiveEnvironment, n as useChangeStatus, p as grantId, s as createEnvironment, t as useChange } from "./use-change-CJpGSNIq.js";
5
+ import { t as useShell } from "./use-shell-C3iYcyP1.js";
6
+ import { t as useSuspenseQuery } from "./useSuspenseQuery-BjAmlGZl.js";
7
+ import { t as useQuery } from "./useQuery-ChxaQ4Cb.js";
8
8
  import { n as toast } from "./dist-CnnV3t2g.js";
9
- import { a as ErrorLine, c as Spinner, h as dropdown_menu_exports, i as EmptyState, n as ConfirmDialog, o as Modal, s as Notice } from "./ui-BI3Bf72q.js";
9
+ import { a as ErrorLine, c as Spinner, h as dropdown_menu_exports, i as EmptyState, n as ConfirmDialog, o as Modal, s as Notice } from "./ui-DvlGkmaH.js";
10
10
  import { t as hasEnvironmentDetails } from "./project-environments-lEzFHUt4.js";
11
- import { A as Pencil, D as MoreHorizontal, F as Search, G as User, I as Settings, M as Plus, P as RotateBack, a as Check, i as Archive, p as Folder, q as Users, v as Key, y as Layers } from "./icons-Dy-5ccDF.js";
12
- import { a as rowClass, i as RowPending, t as ItemFailure } from "./row-state-XBtDoIA4.js";
13
- import { t as Route } from "./projects._project.index-BPPKxKrt.js";
14
- import { i as KIND, o as PrincipalAvatar, s as PrincipalLink } from "./directory-CyYx6Jx1.js";
15
- import { t as useAction } from "./use-action-tzBZvjjQ.js";
11
+ import { A as Plus, D as MoreHorizontal, M as RotateBack, N as Search, P as Settings, U as Users, V as User, a as Check, i as Archive, k as Pencil, p as Folder, v as Key, y as Layers } from "./icons-CWsTEfpn.js";
12
+ import { a as rowClass, i as RowPending, t as ItemFailure } from "./row-state-CAItu3n_.js";
13
+ import { t as Route } from "./projects._project.index-CYyUVTCl.js";
14
+ import { i as KIND, o as PrincipalAvatar, s as PrincipalLink } from "./directory-C9SfNgpM.js";
15
+ import { t as useAction } from "./use-action-C2wz34kq.js";
16
16
  import { n as slugProblem } from "./validation-BQtqPe2V.js";
17
- import { i as useRefusedGrants, n as GrantsTable, r as RefusedGrants, t as GrantRowView } from "./grants-CRijabX0.js";
17
+ import { i as useRefusedGrants, n as GrantsTable, r as RefusedGrants, t as GrantRowView } from "./grants--315KmXu.js";
18
18
  //#region src/components/principal-picker.tsx
19
19
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
20
20
  var import_jsx_runtime = require_jsx_runtime();
@@ -1,7 +1,7 @@
1
1
  import { n as createFileRoute, t as lazyRouteComponent } from "./lazyRouteComponent-CqBNCGuZ.js";
2
- import { d as loadProject } from "./page-D_mO0-sn.js";
2
+ import { d as loadProject } from "./page-BGeDoQO5.js";
3
3
  //#region src/routes/projects.$project.index.tsx
4
- var $$splitComponentImporter = () => import("./projects._project.index-A2BImFIT.js");
4
+ var $$splitComponentImporter = () => import("./projects._project.index-CAxBU4tY.js");
5
5
  var Route = createFileRoute("/projects/$project/")({
6
6
  validateSearch: (search) => ({ tab: search.tab === "users" || search.tab === "tokens" || search.tab === "settings" ? search.tab : void 0 }),
7
7
  loader: ({ context: { client, queryClient }, params }) => loadProject(queryClient, client, params.project),
@@ -1,14 +1,14 @@
1
1
  import { i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
2
2
  import { t as Link } from "./link-42ZWdjzZ.js";
3
- import { C as useCoffre, a as Tile, h as queries, i as PageHeader, n as ClosedDoor } from "./page-D_mO0-sn.js";
4
- import { c as createProject, h as projectsList, n as useChangeStatus, t as useChange } from "./use-change-Dggqxy5y.js";
5
- import { t as useShell } from "./use-shell-CwStDfzX.js";
6
- import { t as useSuspenseQuery } from "./useSuspenseQuery-BuapQt_P.js";
7
- import { i as EmptyState, o as Modal } from "./ui-BI3Bf72q.js";
3
+ import { C as useCoffre, a as Tile, h as queries, i as PageHeader, n as ClosedDoor } from "./page-BGeDoQO5.js";
4
+ import { c as createProject, h as projectsList, n as useChangeStatus, t as useChange } from "./use-change-CJpGSNIq.js";
5
+ import { t as useShell } from "./use-shell-C3iYcyP1.js";
6
+ import { t as useSuspenseQuery } from "./useSuspenseQuery-BjAmlGZl.js";
7
+ import { i as EmptyState, o as Modal } from "./ui-DvlGkmaH.js";
8
8
  import { n as isActiveAccessibleEnvironment } from "./project-environments-lEzFHUt4.js";
9
9
  import { n as ProjectEmptyStateCopy, r as RootAdminOnly } from "./affordances-CKANXDTG.js";
10
- import { M as Plus, h as Hash, p as Folder, r as AlertTriangle, y as Layers } from "./icons-Dy-5ccDF.js";
11
- import { a as rowClass, i as RowPending, r as RowFailure } from "./row-state-XBtDoIA4.js";
10
+ import { A as Plus, h as Hash, p as Folder, r as AlertTriangle, y as Layers } from "./icons-CWsTEfpn.js";
11
+ import { a as rowClass, i as RowPending, r as RowFailure } from "./row-state-CAItu3n_.js";
12
12
  import { n as slugProblem } from "./validation-BQtqPe2V.js";
13
13
  //#region src/routes/projects.index.tsx?tsr-split=component
14
14
  var import_react = /* @__PURE__ */ __toESM(require_react());