@coffre/ui 0.14.7 → 0.16.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.
- package/dist/audit-sentences.d.ts +56 -0
- package/dist/audit-sentences.js +886 -0
- package/dist/audit-sentences.js.map +1 -0
- package/dist/chunks/audit-sentence-C8NnAdjF.js +48 -0
- package/dist/chunks/audit-sentence-C8NnAdjF.js.map +1 -0
- package/dist/chunks/{connected-apps-IJdunsu8.js → connected-apps-6sMSgQ9U.js} +5 -5
- package/dist/chunks/{connected-apps-IJdunsu8.js.map → connected-apps-6sMSgQ9U.js.map} +1 -1
- package/dist/chunks/{delete-place-dIVoK87I.js → delete-place-T469tSN9.js} +5 -5
- package/dist/chunks/{delete-place-dIVoK87I.js.map → delete-place-T469tSN9.js.map} +1 -1
- package/dist/chunks/{directory-BM8yoiJN.js → directory-B_gVf7UL.js} +13 -12
- package/dist/chunks/{directory-BM8yoiJN.js.map → directory-B_gVf7UL.js.map} +1 -1
- package/dist/chunks/{folders-D3A1NGpt.js → folders-CVYauIDz.js} +3 -3
- package/dist/chunks/{folders-D3A1NGpt.js.map → folders-CVYauIDz.js.map} +1 -1
- package/dist/chunks/{grants-CjVmOgb2.js → grants-Dn_EW2XW.js} +6 -6
- package/dist/chunks/{grants-CjVmOgb2.js.map → grants-Dn_EW2XW.js.map} +1 -1
- package/dist/chunks/{multi-combobox-B0JzP1QN.js → multi-combobox-fbBRzi9z.js} +3 -3
- package/dist/chunks/{multi-combobox-B0JzP1QN.js.map → multi-combobox-fbBRzi9z.js.map} +1 -1
- package/dist/chunks/{offboarding-DbozhPym.js → offboarding-CXM464J_.js} +19 -13
- package/dist/chunks/offboarding-CXM464J_.js.map +1 -0
- package/dist/chunks/{page-JTORvh-N.js → page-Cb0ZjGda.js} +2 -2
- package/dist/chunks/{page-JTORvh-N.js.map → page-Cb0ZjGda.js.map} +1 -1
- package/dist/chunks/{personal-tokens-zWZOzLIC.js → personal-tokens-CSHMlRHy.js} +7 -7
- package/dist/chunks/personal-tokens-CSHMlRHy.js.map +1 -0
- package/dist/chunks/{principal-DFBswTBr.js → principal-BKJxbAtE.js} +2 -2
- package/dist/chunks/{principal-DFBswTBr.js.map → principal-BKJxbAtE.js.map} +1 -1
- package/dist/chunks/{principal-page-jJ0RVFg8.js → principal-page-COPmTDVW.js} +20 -17
- package/dist/chunks/principal-page-COPmTDVW.js.map +1 -0
- package/dist/chunks/{project-page-BjwEoXfU.js → project-page-g5_n46Nz.js} +3 -3
- package/dist/chunks/{project-page-BjwEoXfU.js.map → project-page-g5_n46Nz.js.map} +1 -1
- package/dist/chunks/{protected-y7KVhtHd.js → protected-DEWeOrmI.js} +7 -7
- package/dist/chunks/{protected-y7KVhtHd.js.map → protected-DEWeOrmI.js.map} +1 -1
- package/dist/chunks/{queries-2jdgTwfZ.js → queries-D4_o-bz3.js} +11 -88
- package/dist/chunks/queries-D4_o-bz3.js.map +1 -0
- package/dist/chunks/{references-CRT2BsOS.js → references-wTh_DT0M.js} +27 -23
- package/dist/chunks/references-wTh_DT0M.js.map +1 -0
- package/dist/chunks/{role-field-DswIpPqY.js → role-field-BiP09qfN.js} +4 -4
- package/dist/chunks/{role-field-DswIpPqY.js.map → role-field-BiP09qfN.js.map} +1 -1
- package/dist/chunks/{row-state-xtRGFnDc.js → row-state-CYhtmUkc.js} +3 -3
- package/dist/chunks/{row-state-xtRGFnDc.js.map → row-state-CYhtmUkc.js.map} +1 -1
- package/dist/chunks/{signin-errors-TlQmQe0t.js → signin-errors-BMnox7XD.js} +5 -19
- package/dist/chunks/signin-errors-BMnox7XD.js.map +1 -0
- package/dist/chunks/{theme-Ck45wzWB.js → theme-imSolE1q.js} +3 -3
- package/dist/chunks/{theme-Ck45wzWB.js.map → theme-imSolE1q.js.map} +1 -1
- package/dist/chunks/{ui-D-blFWfx.js → ui-Q_Eczt7m.js} +7 -3
- package/dist/chunks/{ui-D-blFWfx.js.map → ui-Q_Eczt7m.js.map} +1 -1
- package/dist/chunks/{use-action-CXEFFjx5.js → use-action-BfnN-De2.js} +3 -3
- package/dist/chunks/{use-action-CXEFFjx5.js.map → use-action-BfnN-De2.js.map} +1 -1
- package/dist/chunks/{use-change-BC4xo02c.js → use-change-Cc0X4sF3.js} +6 -4
- package/dist/chunks/use-change-Cc0X4sF3.js.map +1 -0
- package/dist/chunks/{use-roles-DswiNxBk.js → use-roles-stcv2QFj.js} +3 -3
- package/dist/chunks/{use-roles-DswiNxBk.js.map → use-roles-stcv2QFj.js.map} +1 -1
- package/dist/chunks/{use-shell-zpjE_MKh.js → use-shell-DMhLa2sh.js} +3 -3
- package/dist/chunks/{use-shell-zpjE_MKh.js.map → use-shell-DMhLa2sh.js.map} +1 -1
- package/dist/index.d.ts +22 -10
- package/dist/index.js +7 -7
- package/dist/pages/account.js +11 -11
- package/dist/pages/approval.js +2 -2
- package/dist/pages/audit.js +163 -152
- package/dist/pages/audit.js.map +1 -1
- package/dist/pages/device-login.js +2 -2
- package/dist/pages/environment.js +67 -35
- package/dist/pages/environment.js.map +1 -1
- package/dist/pages/login.js +6 -15
- package/dist/pages/login.js.map +1 -1
- package/dist/pages/oauth-authorize.js +2 -2
- package/dist/pages/project-access.js +11 -11
- package/dist/pages/project-environments.js +12 -12
- package/dist/pages/project-settings.js +8 -8
- package/dist/pages/project.js +3 -3
- package/dist/pages/projects.js +8 -8
- package/dist/pages/service-account.js +19 -15
- package/dist/pages/service-account.js.map +1 -1
- package/dist/pages/service-accounts.js +5 -5
- package/dist/pages/settings.js +26 -37
- package/dist/pages/settings.js.map +1 -1
- package/dist/pages/unregistered.js +2 -2
- package/dist/pages/user.js +7 -7
- package/dist/pages/user.js.map +1 -1
- package/dist/pages/users.js +5 -5
- package/package.json +8 -3
- package/src/components/directory.tsx +5 -4
- package/src/components/offboarding.tsx +9 -9
- package/src/components/personal-tokens.tsx +5 -2
- package/src/components/principal-page.tsx +4 -3
- package/src/components/references.tsx +18 -7
- package/src/components/trusted-workloads.tsx +6 -5
- package/src/components/ui.tsx +5 -0
- package/src/lib/audit-proofs.ts +51 -0
- package/src/lib/audit-sentences.ts +473 -509
- package/src/lib/bindings.ts +6 -0
- package/src/lib/changes.ts +3 -1
- package/src/lib/coffre.ts +2 -2
- package/src/lib/queries.ts +9 -94
- package/src/lib/reveal.ts +32 -5
- package/src/lib/row-reads.ts +2 -2
- package/src/lib/signin-errors.ts +5 -33
- package/src/pages/audit.tsx +145 -182
- package/src/pages/environment.tsx +21 -20
- package/src/pages/login.tsx +2 -4
- package/src/pages/settings.tsx +6 -10
- package/src/pages/user.tsx +2 -2
- package/src/parity.ts +0 -2
- package/src/styles/globals.css +18 -2
- package/dist/chunks/audit-sentence-JgJEwQEC.js +0 -969
- package/dist/chunks/audit-sentence-JgJEwQEC.js.map +0 -1
- package/dist/chunks/offboarding-DbozhPym.js.map +0 -1
- package/dist/chunks/personal-tokens-zWZOzLIC.js.map +0 -1
- package/dist/chunks/principal-page-jJ0RVFg8.js.map +0 -1
- package/dist/chunks/queries-2jdgTwfZ.js.map +0 -1
- package/dist/chunks/references-CRT2BsOS.js.map +0 -1
- package/dist/chunks/signin-errors-TlQmQe0t.js.map +0 -1
- package/dist/chunks/use-change-BC4xo02c.js.map +0 -1
package/dist/pages/login.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as ErrorLine, l as Spinner } from "../chunks/ui-
|
|
2
|
-
import { K as ProviderMark, L as Lock, X as ShieldCheck, n as ClosedDoor } from "../chunks/page-
|
|
3
|
-
import { t as useShell } from "../chunks/use-shell-
|
|
4
|
-
import { n as signinErrorMessage } from "../chunks/signin-errors-
|
|
1
|
+
import { a as ErrorLine, l as Spinner } from "../chunks/ui-Q_Eczt7m.js";
|
|
2
|
+
import { K as ProviderMark, L as Lock, X as ShieldCheck, n as ClosedDoor } from "../chunks/page-Cb0ZjGda.js";
|
|
3
|
+
import { t as useShell } from "../chunks/use-shell-DMhLa2sh.js";
|
|
4
|
+
import { n as signinErrorMessage } from "../chunks/signin-errors-BMnox7XD.js";
|
|
5
5
|
import { t as useOneTime } from "../chunks/one-time-DXEl9hbg.js";
|
|
6
6
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
7
7
|
import { useState } from "react";
|
|
@@ -39,17 +39,8 @@ function CloudflareAuthenticationFailed() {
|
|
|
39
39
|
function ProviderLoginPage({ title, note, providers }) {
|
|
40
40
|
const search = Route.useSearch();
|
|
41
41
|
const { next } = search;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
"with",
|
|
45
|
-
"via"
|
|
46
|
-
]);
|
|
47
|
-
const label = (id) => providers.find((provider) => provider.id === id)?.label;
|
|
48
|
-
const already = (once.with ?? "").split(",").map(label).filter((name) => name !== void 0);
|
|
49
|
-
const message = signinErrorMessage(once.error, {
|
|
50
|
-
providers: already,
|
|
51
|
-
via: once.via === void 0 ? void 0 : label(once.via)
|
|
52
|
-
});
|
|
42
|
+
const { error } = useOneTime(search, ["error"]);
|
|
43
|
+
const message = signinErrorMessage(error);
|
|
53
44
|
const [leaving, setLeaving] = useState(null);
|
|
54
45
|
const query = next === void 0 ? "" : `?next=${encodeURIComponent(next)}`;
|
|
55
46
|
return /* @__PURE__ */ jsxs("section", {
|
package/dist/pages/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","names":[],"sources":["../../src/pages/login.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { useShell } from '../lib/use-shell';\nimport { signinErrorMessage } from '../lib/signin-errors';\nimport { useOneTime } from '../lib/one-time';\nimport { ErrorLine, Spinner } from '../components/ui';\nimport { ClosedDoor } from '../components/page';\nimport { Lock, ProviderMark, ShieldCheck } from '../components/icons';\nimport { pageRoute } from '../lib/page-route';\nimport type { login } from '../options';\n\nconst Route = pageRoute<typeof login>();\n\n/**\n * The front door, as `GET /api/auth` describes it.\n *\n * With coffre's own sign-in, one button per provider. Behind Cloudflare\n * Access, Access authenticates people before any request arrives, so this\n * page only explains why it is showing at all.\n */\nexport function LoginPage() {\n const { signin, access } = useShell().auth;\n if (signin !== null) return <ProviderLoginPage {...signin} />;\n return access?.assertion ? <CloudflareAuthenticationFailed /> : <CloudflareAccessRequired />;\n}\n\nfunction CloudflareAccessRequired() {\n return (\n <ClosedDoor icon={<Lock size={18} />} label=\"Cloudflare Access\" title=\"Open coffre through Access\">\n <p>\n Cloudflare Access signs you in to coffre, and this request did not come through it.\n Open coffre at its Access-protected hostname.\n </p>\n </ClosedDoor>\n );\n}\n\nfunction CloudflareAuthenticationFailed() {\n return (\n <ClosedDoor\n icon={<ShieldCheck size={18} />}\n label=\"Cloudflare Access\"\n title=\"Your identity could not be confirmed\"\n >\n <p>\n coffre could not verify the identity Cloudflare Access sent. Your Access session may\n have expired.\n </p>\n <p>\n Reopen coffre through its Access-protected hostname. If this keeps happening, tell\n whoever runs coffre.\n </p>\n </ClosedDoor>\n );\n}\n\nfunction ProviderLoginPage({\n title,\n note,\n providers,\n}: {\n title: string;\n note: string | null;\n providers: { id: string; label: string; brand: string }[];\n}) {\n const search = Route.useSearch();\n const { next } = search;\n // Shown once: a reload is a clean retry.\n const
|
|
1
|
+
{"version":3,"file":"login.js","names":[],"sources":["../../src/pages/login.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { useShell } from '../lib/use-shell';\nimport { signinErrorMessage } from '../lib/signin-errors';\nimport { useOneTime } from '../lib/one-time';\nimport { ErrorLine, Spinner } from '../components/ui';\nimport { ClosedDoor } from '../components/page';\nimport { Lock, ProviderMark, ShieldCheck } from '../components/icons';\nimport { pageRoute } from '../lib/page-route';\nimport type { login } from '../options';\n\nconst Route = pageRoute<typeof login>();\n\n/**\n * The front door, as `GET /api/auth` describes it.\n *\n * With coffre's own sign-in, one button per provider. Behind Cloudflare\n * Access, Access authenticates people before any request arrives, so this\n * page only explains why it is showing at all.\n */\nexport function LoginPage() {\n const { signin, access } = useShell().auth;\n if (signin !== null) return <ProviderLoginPage {...signin} />;\n return access?.assertion ? <CloudflareAuthenticationFailed /> : <CloudflareAccessRequired />;\n}\n\nfunction CloudflareAccessRequired() {\n return (\n <ClosedDoor icon={<Lock size={18} />} label=\"Cloudflare Access\" title=\"Open coffre through Access\">\n <p>\n Cloudflare Access signs you in to coffre, and this request did not come through it.\n Open coffre at its Access-protected hostname.\n </p>\n </ClosedDoor>\n );\n}\n\nfunction CloudflareAuthenticationFailed() {\n return (\n <ClosedDoor\n icon={<ShieldCheck size={18} />}\n label=\"Cloudflare Access\"\n title=\"Your identity could not be confirmed\"\n >\n <p>\n coffre could not verify the identity Cloudflare Access sent. Your Access session may\n have expired.\n </p>\n <p>\n Reopen coffre through its Access-protected hostname. If this keeps happening, tell\n whoever runs coffre.\n </p>\n </ClosedDoor>\n );\n}\n\nfunction ProviderLoginPage({\n title,\n note,\n providers,\n}: {\n title: string;\n note: string | null;\n providers: { id: string; label: string; brand: string }[];\n}) {\n const search = Route.useSearch();\n const { next } = search;\n // Shown once: a reload is a clean retry.\n const { error } = useOneTime(search, ['error']);\n const message = signinErrorMessage(error);\n const [leaving, setLeaving] = useState<string | null>(null);\n const query = next === undefined ? '' : `?next=${encodeURIComponent(next)}`;\n\n return (\n <section className=\"card signin\" aria-labelledby=\"signin-title\">\n <div className=\"signin-head\">\n <h1 className=\"signin-title\" id=\"signin-title\">\n {title}\n </h1>\n <p className=\"signin-lede\">\n {note ?? 'Sign in with your organization’s account. Only people an admin has invited can get in.'}\n </p>\n </div>\n\n {message !== null && (\n <div className=\"signin-error\">\n <ErrorLine error={message} />\n </div>\n )}\n\n {providers.length === 0 ? (\n <p className=\"signin-empty\">\n No sign-in provider is configured. Whoever runs coffre lists them in{' '}\n <span className=\"mono\">signin({'{'} providers {'}'})</span>.\n </p>\n ) : (\n <ul className=\"providers\">\n {providers.map((provider) => (\n <li key={provider.id}>\n {/* A plain link: the provider's page is a full navigation away. */}\n <a\n className=\"btn provider\"\n href={`/auth/signin/${encodeURIComponent(provider.id)}${query}`}\n aria-busy={leaving === provider.id}\n onClick={() => setLeaving(provider.id)}\n >\n <span className=\"provider-mark\" aria-hidden>\n {leaving === provider.id ? <Spinner /> : <ProviderMark brand={provider.brand} />}\n </span>\n Continue with {provider.label}\n </a>\n </li>\n ))}\n </ul>\n )}\n </section>\n );\n}\n"],"mappings":";;;;;;;;;AAWA,IAAM,QAAQ,UAAwB;;;;;;;;AAStC,SAAgB,YAAY;CAC1B,MAAM,EAAE,QAAQ,WAAW,SAAS,CAAC,CAAC;CACtC,IAAI,WAAW,MAAM,OAAO,oBAAC,mBAAD,EAAmB,GAAI,OAAS,CAAA;CAC5D,OAAO,QAAQ,YAAY,oBAAC,gCAAD,CAAiC,CAAA,IAAI,oBAAC,0BAAD,CAA2B,CAAA;AAC7F;AAEA,SAAS,2BAA2B;CAClC,OACE,oBAAC,YAAD;EAAY,MAAM,oBAAC,MAAD,EAAM,MAAM,GAAK,CAAA;EAAG,OAAM;EAAoB,OAAM;YACpE,oBAAC,KAAD,EAAA,UAAG,oIAGA,CAAA;CACO,CAAA;AAEhB;AAEA,SAAS,iCAAiC;CACxC,OACE,qBAAC,YAAD;EACE,MAAM,oBAAC,aAAD,EAAa,MAAM,GAAK,CAAA;EAC9B,OAAM;EACN,OAAM;YAHR,CAKE,oBAAC,KAAD,EAAA,UAAG,qGAGA,CAAA,GACH,oBAAC,KAAD,EAAA,UAAG,0GAGA,CAAA,CACO;;AAEhB;AAEA,SAAS,kBAAkB,EACzB,OACA,MACA,aAKC;CACD,MAAM,SAAS,MAAM,UAAU;CAC/B,MAAM,EAAE,SAAS;CAEjB,MAAM,EAAE,UAAU,WAAW,QAAQ,CAAC,OAAO,CAAC;CAC9C,MAAM,UAAU,mBAAmB,KAAK;CACxC,MAAM,CAAC,SAAS,cAAc,SAAwB,IAAI;CAC1D,MAAM,QAAQ,SAAS,KAAA,IAAY,KAAK,SAAS,mBAAmB,IAAI;CAExE,OACE,qBAAC,WAAD;EAAS,WAAU;EAAc,mBAAgB;YAAjD;GACE,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,MAAD;KAAI,WAAU;KAAe,IAAG;eAC7B;IACC,CAAA,GACJ,oBAAC,KAAD;KAAG,WAAU;eACV,QAAQ;IACR,CAAA,CACA;;GAEJ,YAAY,QACX,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,WAAD,EAAW,OAAO,QAAU,CAAA;GACzB,CAAA;GAGN,UAAU,WAAW,IACpB,qBAAC,KAAD;IAAG,WAAU;cAAb;KAA4B;KAC2C;KACrE,qBAAC,QAAD;MAAM,WAAU;gBAAhB;OAAuB;OAAQ;OAAI;OAAY;OAAI;MAAO;;KAAC;IAC1D;QAEH,oBAAC,MAAD;IAAI,WAAU;cACX,UAAU,KAAK,aACd,oBAAC,MAAD,EAAA,UAEE,qBAAC,KAAD;KACE,WAAU;KACV,MAAM,gBAAgB,mBAAmB,SAAS,EAAE,IAAI;KACxD,aAAW,YAAY,SAAS;KAChC,eAAe,WAAW,SAAS,EAAE;eAJvC;MAME,oBAAC,QAAD;OAAM,WAAU;OAAgB,eAAA;iBAC7B,YAAY,SAAS,KAAK,oBAAC,SAAD,CAAU,CAAA,IAAI,oBAAC,cAAD,EAAc,OAAO,SAAS,MAAQ,CAAA;MAC3E,CAAA;MAAC;MACQ,SAAS;KACvB;OACD,GAbK,SAAS,EAad,CACL;GACC,CAAA;EAEC;;AAEb"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ErrorLine, c as Notice, l as Spinner } from "../chunks/ui-
|
|
2
|
-
import { $ as SlashCircle, F as Link, c as statusOf, g as ArrowRight, n as ClosedDoor, o as failureMessage, u as useCoffre } from "../chunks/page-
|
|
1
|
+
import { a as ErrorLine, c as Notice, l as Spinner } from "../chunks/ui-Q_Eczt7m.js";
|
|
2
|
+
import { $ as SlashCircle, F as Link, c as statusOf, g as ArrowRight, n as ClosedDoor, o as failureMessage, u as useCoffre } from "../chunks/page-Cb0ZjGda.js";
|
|
3
3
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as Notice, i as EmptyState, l as Spinner, s as Modal } from "../chunks/ui-
|
|
3
|
-
import { G as Plus, J as Search, M as Key, _ as Check, it as User, u as useCoffre } from "../chunks/page-
|
|
4
|
-
import { t as useShell } from "../chunks/use-shell-
|
|
5
|
-
import { Z as projectAccessLabel, t as useChange, v as grantAccess, y as grantId } from "../chunks/use-change-
|
|
6
|
-
import { f as roleNameOf, t as useRoles } from "../chunks/use-roles-
|
|
7
|
-
import { n as PrincipalLink, t as PrincipalAvatar } from "../chunks/principal-
|
|
8
|
-
import { r as KIND } from "../chunks/directory-
|
|
1
|
+
import { o as listsServices, y as queries } from "../chunks/queries-D4_o-bz3.js";
|
|
2
|
+
import { c as Notice, i as EmptyState, l as Spinner, s as Modal } from "../chunks/ui-Q_Eczt7m.js";
|
|
3
|
+
import { G as Plus, J as Search, M as Key, _ as Check, it as User, u as useCoffre } from "../chunks/page-Cb0ZjGda.js";
|
|
4
|
+
import { t as useShell } from "../chunks/use-shell-DMhLa2sh.js";
|
|
5
|
+
import { Z as projectAccessLabel, t as useChange, v as grantAccess, y as grantId } from "../chunks/use-change-Cc0X4sF3.js";
|
|
6
|
+
import { f as roleNameOf, t as useRoles } from "../chunks/use-roles-stcv2QFj.js";
|
|
7
|
+
import { n as PrincipalLink, t as PrincipalAvatar } from "../chunks/principal-BKJxbAtE.js";
|
|
8
|
+
import { r as KIND } from "../chunks/directory-B_gVf7UL.js";
|
|
9
9
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
10
|
-
import { a as ReferencesInto } from "../chunks/references-
|
|
11
|
-
import { i as useRefusedGrants, n as GrantsTable, r as RefusedGrants, t as GrantRowView } from "../chunks/grants-
|
|
12
|
-
import { t as useProject } from "../chunks/project-page-
|
|
10
|
+
import { a as ReferencesInto } from "../chunks/references-wTh_DT0M.js";
|
|
11
|
+
import { i as useRefusedGrants, n as GrantsTable, r as RefusedGrants, t as GrantRowView } from "../chunks/grants-Dn_EW2XW.js";
|
|
12
|
+
import { t as useProject } from "../chunks/project-page-g5_n46Nz.js";
|
|
13
13
|
import { useId, useState } from "react";
|
|
14
14
|
import { Link } from "@tanstack/react-router";
|
|
15
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ErrorLine, c as Notice, i as EmptyState, n as ConfirmDialog, o as MenuPopup, s as Modal, u as Timestamp } from "../chunks/ui-
|
|
3
|
-
import { G as Plus, H as MoreHorizontal, W as Pencil, b as ChevronRight, h as Archive, nt as Trash, q as RotateBack, t as Card, u as useCoffre } from "../chunks/page-
|
|
4
|
-
import { a as rowClass, i as RowPending, t as ItemFailure } from "../chunks/row-state-
|
|
5
|
-
import { t as useShell } from "../chunks/use-shell-
|
|
6
|
-
import { O as renameEnvironment, g as environmentId, l as createEnvironment, n as useChangeStatus, o as archiveEnvironment, t as useChange } from "../chunks/use-change-
|
|
1
|
+
import { D as isActiveAccessibleEnvironment, E as hasEnvironmentDetails, i as keys, t as affects, y as queries } from "../chunks/queries-D4_o-bz3.js";
|
|
2
|
+
import { a as ErrorLine, c as Notice, i as EmptyState, n as ConfirmDialog, o as MenuPopup, s as Modal, u as Timestamp } from "../chunks/ui-Q_Eczt7m.js";
|
|
3
|
+
import { G as Plus, H as MoreHorizontal, W as Pencil, b as ChevronRight, h as Archive, nt as Trash, q as RotateBack, t as Card, u as useCoffre } from "../chunks/page-Cb0ZjGda.js";
|
|
4
|
+
import { a as rowClass, i as RowPending, t as ItemFailure } from "../chunks/row-state-CYhtmUkc.js";
|
|
5
|
+
import { t as useShell } from "../chunks/use-shell-DMhLa2sh.js";
|
|
6
|
+
import { O as renameEnvironment, g as environmentId, l as createEnvironment, n as useChangeStatus, o as archiveEnvironment, t as useChange } from "../chunks/use-change-Cc0X4sF3.js";
|
|
7
7
|
import { t as environmentSlugProblem } from "../chunks/validation-DiHIwZRA.js";
|
|
8
|
-
import { t as PrincipalAvatar } from "../chunks/principal-
|
|
8
|
+
import { t as PrincipalAvatar } from "../chunks/principal-BKJxbAtE.js";
|
|
9
9
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
10
|
-
import { t as useAction } from "../chunks/use-action-
|
|
11
|
-
import { t as Protection } from "../chunks/protected-
|
|
12
|
-
import { o as archiveBlockers, t as ArchiveBlocked } from "../chunks/references-
|
|
13
|
-
import { t as useProject } from "../chunks/project-page-
|
|
14
|
-
import { t as DeletePlaceDialog } from "../chunks/delete-place-
|
|
10
|
+
import { t as useAction } from "../chunks/use-action-BfnN-De2.js";
|
|
11
|
+
import { t as Protection } from "../chunks/protected-DEWeOrmI.js";
|
|
12
|
+
import { o as archiveBlockers, t as ArchiveBlocked } from "../chunks/references-wTh_DT0M.js";
|
|
13
|
+
import { t as useProject } from "../chunks/project-page-g5_n46Nz.js";
|
|
14
|
+
import { t as DeletePlaceDialog } from "../chunks/delete-place-T469tSN9.js";
|
|
15
15
|
import { useState } from "react";
|
|
16
16
|
import { Link } from "@tanstack/react-router";
|
|
17
17
|
import { toast } from "sonner";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as affects,
|
|
2
|
-
import { a as ErrorLine, l as Spinner, n as ConfirmDialog } from "../chunks/ui-
|
|
3
|
-
import { h as Archive, nt as Trash, q as RotateBack, t as Card, u as useCoffre } from "../chunks/page-
|
|
4
|
-
import { t as useShell } from "../chunks/use-shell-
|
|
1
|
+
import { t as affects, y as queries } from "../chunks/queries-D4_o-bz3.js";
|
|
2
|
+
import { a as ErrorLine, l as Spinner, n as ConfirmDialog } from "../chunks/ui-Q_Eczt7m.js";
|
|
3
|
+
import { h as Archive, nt as Trash, q as RotateBack, t as Card, u as useCoffre } from "../chunks/page-Cb0ZjGda.js";
|
|
4
|
+
import { t as useShell } from "../chunks/use-shell-DMhLa2sh.js";
|
|
5
5
|
import { a as slugProblem, n as folderProblem } from "../chunks/validation-DiHIwZRA.js";
|
|
6
6
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
7
|
-
import { t as useAction } from "../chunks/use-action-
|
|
8
|
-
import { o as archiveBlockers, t as ArchiveBlocked } from "../chunks/references-
|
|
9
|
-
import { t as useProject } from "../chunks/project-page-
|
|
10
|
-
import { t as DeletePlaceDialog } from "../chunks/delete-place-
|
|
7
|
+
import { t as useAction } from "../chunks/use-action-BfnN-De2.js";
|
|
8
|
+
import { o as archiveBlockers, t as ArchiveBlocked } from "../chunks/references-wTh_DT0M.js";
|
|
9
|
+
import { t as useProject } from "../chunks/project-page-g5_n46Nz.js";
|
|
10
|
+
import { t as DeletePlaceDialog } from "../chunks/delete-place-T469tSN9.js";
|
|
11
11
|
import { useEffect, useState } from "react";
|
|
12
12
|
import { useRouter } from "@tanstack/react-router";
|
|
13
13
|
import { toast } from "sonner";
|
package/dist/pages/project.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as projectOf, y as queries } from "../chunks/queries-D4_o-bz3.js";
|
|
2
2
|
import { t as useMounted } from "../chunks/mounted-jJmqqV_n.js";
|
|
3
|
-
import { c as Notice } from "../chunks/ui-
|
|
4
|
-
import { E as Folder, M as Key, N as Layers, Y as Settings, i as PageHeader, n as ClosedDoor, ot as Users, u as useCoffre } from "../chunks/page-
|
|
3
|
+
import { c as Notice } from "../chunks/ui-Q_Eczt7m.js";
|
|
4
|
+
import { E as Folder, M as Key, N as Layers, Y as Settings, i as PageHeader, n as ClosedDoor, ot as Users, u as useCoffre } from "../chunks/page-Cb0ZjGda.js";
|
|
5
5
|
import { t as PageTabs } from "../chunks/tabs-BmwKfUeK.js";
|
|
6
6
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
7
7
|
import { Link, Outlet } from "@tanstack/react-router";
|
package/dist/pages/projects.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ErrorLine, i as EmptyState, s as Modal } from "../chunks/ui-
|
|
1
|
+
import { D as isActiveAccessibleEnvironment, t as affects, y as queries } from "../chunks/queries-D4_o-bz3.js";
|
|
2
|
+
import { a as ErrorLine, i as EmptyState, s as Modal } from "../chunks/ui-Q_Eczt7m.js";
|
|
3
3
|
import { n as MakesProjectsOnly, r as ProjectEmptyStateCopy } from "../chunks/affordances-Dtyha68j.js";
|
|
4
|
-
import { E as Folder, G as Plus, L as Lock, N as Layers, d as Tile, i as PageHeader, k as Hash, m as AlertTriangle, n as ClosedDoor, u as useCoffre } from "../chunks/page-
|
|
5
|
-
import { a as rowClass, i as RowPending, r as RowFailure } from "../chunks/row-state-
|
|
6
|
-
import { t as useShell } from "../chunks/use-shell-
|
|
7
|
-
import { C as projectsList, n as useChangeStatus, t as useChange, u as createProject } from "../chunks/use-change-
|
|
4
|
+
import { E as Folder, G as Plus, L as Lock, N as Layers, d as Tile, i as PageHeader, k as Hash, m as AlertTriangle, n as ClosedDoor, u as useCoffre } from "../chunks/page-Cb0ZjGda.js";
|
|
5
|
+
import { a as rowClass, i as RowPending, r as RowFailure } from "../chunks/row-state-CYhtmUkc.js";
|
|
6
|
+
import { t as useShell } from "../chunks/use-shell-DMhLa2sh.js";
|
|
7
|
+
import { C as projectsList, n as useChangeStatus, t as useChange, u as createProject } from "../chunks/use-change-Cc0X4sF3.js";
|
|
8
8
|
import { a as slugProblem } from "../chunks/validation-DiHIwZRA.js";
|
|
9
|
-
import { t as useAction } from "../chunks/use-action-
|
|
10
|
-
import { n as FolderRow, t as FolderMenu } from "../chunks/folders-
|
|
9
|
+
import { t as useAction } from "../chunks/use-action-BfnN-De2.js";
|
|
10
|
+
import { n as FolderRow, t as FolderMenu } from "../chunks/folders-CVYauIDz.js";
|
|
11
11
|
import { useState } from "react";
|
|
12
12
|
import { Link } from "@tanstack/react-router";
|
|
13
13
|
import { toast } from "sonner";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
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
|
|
3
|
-
import { F as Link, G as Plus, M as Key, O as GitHub, c as statusOf, s as memberRef, st as X, t as Card, u as useCoffre, v as CheckCircle } from "../chunks/page-
|
|
4
|
-
import { a as rowClass, i as RowPending, r as RowFailure } from "../chunks/row-state-
|
|
5
|
-
import { t as useShell } from "../chunks/use-shell-
|
|
6
|
-
import { E as removeBinding, j as revokeCredential, n as useChangeStatus, t as useChange } from "../chunks/use-change-
|
|
7
|
-
import { f as roleNameOf, t as useRoles } from "../chunks/use-roles-
|
|
1
|
+
import { S as signInWays, a as listsAccess, t as affects, y as queries } from "../chunks/queries-D4_o-bz3.js";
|
|
2
|
+
import { S as usePreferences, 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-Q_Eczt7m.js";
|
|
3
|
+
import { F as Link, G as Plus, M as Key, O as GitHub, c as statusOf, s as memberRef, st as X, t as Card, u as useCoffre, v as CheckCircle } from "../chunks/page-Cb0ZjGda.js";
|
|
4
|
+
import { a as rowClass, i as RowPending, r as RowFailure } from "../chunks/row-state-CYhtmUkc.js";
|
|
5
|
+
import { t as useShell } from "../chunks/use-shell-DMhLa2sh.js";
|
|
6
|
+
import { E as removeBinding, j as revokeCredential, n as useChangeStatus, t as useChange } from "../chunks/use-change-Cc0X4sF3.js";
|
|
7
|
+
import { f as roleNameOf, t as useRoles } from "../chunks/use-roles-stcv2QFj.js";
|
|
8
8
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
9
|
-
import { t as useAction } from "../chunks/use-action-
|
|
10
|
-
import { t as MultiCombobox } from "../chunks/multi-combobox-
|
|
11
|
-
import { i as ActionsLog, n as PrincipalLayout, r as withheldInWords, t as PrincipalAccess } from "../chunks/principal-page-
|
|
9
|
+
import { t as useAction } from "../chunks/use-action-BfnN-De2.js";
|
|
10
|
+
import { t as MultiCombobox } from "../chunks/multi-combobox-fbBRzi9z.js";
|
|
11
|
+
import { i as ActionsLog, n as PrincipalLayout, r as withheldInWords, t as PrincipalAccess } from "../chunks/principal-page-COPmTDVW.js";
|
|
12
12
|
import { Fragment, useEffect, useId, useState } from "react";
|
|
13
13
|
import { credentialScopeInWords } from "@coffre/core/access";
|
|
14
14
|
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
@@ -419,6 +419,10 @@ function summary(binding) {
|
|
|
419
419
|
detail: `sub ${claims.sub}`
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
|
+
/** What a binding's credentials reach, in words; a null scope, one 0.4 made and never sealed, reaches nothing. */
|
|
423
|
+
function reached(scope) {
|
|
424
|
+
return credentialScopeInWords(scope ?? {});
|
|
425
|
+
}
|
|
422
426
|
/** An issuer as a title: its host, when it is a URL; a binding that carries its keys may name any string. */
|
|
423
427
|
function issuerName(issuer) {
|
|
424
428
|
try {
|
|
@@ -847,7 +851,7 @@ function TrustedWorkloads({ serviceId, bindings, grants }) {
|
|
|
847
851
|
]
|
|
848
852
|
})]
|
|
849
853
|
}) }),
|
|
850
|
-
/* @__PURE__ */ jsx("td", { children:
|
|
854
|
+
/* @__PURE__ */ jsx("td", { children: reached(binding.scope) }),
|
|
851
855
|
/* @__PURE__ */ jsx("td", {
|
|
852
856
|
className: "nowrap",
|
|
853
857
|
children: /* @__PURE__ */ jsxs("span", {
|
|
@@ -1218,11 +1222,11 @@ function Exposure({ events }) {
|
|
|
1218
1222
|
}
|
|
1219
1223
|
/** What the bindings a plan replaces reached, beside what the new one reaches: the same, unless the person chose again. */
|
|
1220
1224
|
function Reached({ plan, bindings }) {
|
|
1221
|
-
const
|
|
1225
|
+
const before = [...new Set(plan.replaces.flatMap((replaced) => {
|
|
1222
1226
|
const scope = bindings.find((binding) => binding.id === replaced.id)?.scope;
|
|
1223
|
-
return scope === void 0 ? [] : [
|
|
1227
|
+
return scope === void 0 ? [] : [reached(scope)];
|
|
1224
1228
|
}))];
|
|
1225
|
-
if (
|
|
1229
|
+
if (before.every((words) => words === credentialScopeInWords(plan.scope))) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1226
1230
|
" This one reaches what ",
|
|
1227
1231
|
plan.replaces.length === 1 ? "it" : "they",
|
|
1228
1232
|
" did."
|
|
@@ -1231,7 +1235,7 @@ function Reached({ plan, bindings }) {
|
|
|
1231
1235
|
" ",
|
|
1232
1236
|
plan.replaces.length === 1 ? "It" : "They",
|
|
1233
1237
|
" reached ",
|
|
1234
|
-
|
|
1238
|
+
before.join("; "),
|
|
1235
1239
|
": this one reaches what it says above."
|
|
1236
1240
|
] });
|
|
1237
1241
|
}
|