permdock 0.8.0 → 0.9.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/a2a/index.d.ts +4 -4
- package/dist/a2a/index.js +3 -3
- package/dist/{action-result-CL-QCITA.d.ts → action-result-BcudBQOF.d.ts} +1 -1
- package/dist/{adoption-scan-BLs67P1l.js → adoption-scan-Ch07MdxN.js} +1 -1
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.d.ts +3 -3
- package/dist/ai-sdk/index.js +3 -3
- package/dist/{approval-prompt-PYagyQUj.d.ts → approval-prompt-3BqWczTt.d.ts} +1 -1
- package/dist/approvals/index.d.ts +3 -3
- package/dist/{arazzo-3RhGfkAK.js → arazzo-BpS7LnV0.js} +1 -1
- package/dist/{arazzo-B5-ulWif.js → arazzo-CmQaGPkM.js} +2 -2
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +1 -1
- package/dist/{audience-BAkBDMqn.js → audience-DTjR8xet.js} +1 -1
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +1 -1
- package/dist/{automation-DqEoWHBc.d.ts → automation-C6Jg75xq.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-supabase/index.d.ts +6 -6
- package/dist/better-supabase/index.js +3 -3
- package/dist/{bind-D_sZSVA3.js → bind-BNQA9JK9.js} +7 -3
- package/dist/{bind-Cp2hBHzP.d.ts → bind-YYjvfpB9.d.ts} +12 -7
- package/dist/{build-instance-CNWaYJyr.js → build-instance-BWXqwQYU.js} +1 -1
- package/dist/{capability-ChuiONQU.d.ts → capability-Di9tiUvi.d.ts} +1 -1
- package/dist/{casbin-cbSbhT_k.js → casbin-B7_yS-oo.js} +1 -1
- package/dist/{casbin-H0rKxBx2.js → casbin-bHyIxTNQ.js} +1 -1
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +2 -2
- package/dist/{catalog-BFpz2EmT.js → catalog-CGlSwU6j.js} +2 -2
- package/dist/catalog-D3oS2GH3.js +1 -0
- package/dist/{catalog-DCspHDc8.js → catalog-amPDr0JQ.js} +1 -1
- package/dist/{catalog-operations-Dadrl7Z-.js → catalog-operations-DeHTrJSV.js} +1 -1
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +2 -2
- package/dist/cloud/index.d.ts +8 -8
- package/dist/{cloud-BFlGMaak.js → cloud-3kWfjnYy.js} +2 -2
- package/dist/{codemod-DWSN2erG.js → codemod-Bv5i-Mzo.js} +1 -1
- package/dist/{codemod-DLQ9Zpo4.js → codemod-D9Aiii1r.js} +2 -2
- package/dist/{collect-Bzv3le0A.js → collect-B80GYEot.js} +2 -2
- package/dist/collect-D-eroIfV.js +1 -0
- package/dist/{collect-B7ZFAJU3.js → collect-WCl8cJQV.js} +1 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-BFzysW3o.d.ts → compile-BEklRUYo.d.ts} +2 -2
- package/dist/{completion-saoYiRFO.js → completion-_bc0OUQ-.js} +1 -1
- package/dist/{config-DBeXXmBF.js → config-D5XrLWpk.js} +1 -1
- package/dist/{config-report-BipSWA6V.js → config-report-BmWIskD7.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +2 -2
- package/dist/{core-hWIARPDz.d.ts → core-CFepFiDP.d.ts} +2 -2
- package/dist/{core-H-mbhpZc.js → core-DzVINFbU.js} +3 -3
- package/dist/{create-Cq4Uox0f.js → create-6EwRQlig.js} +3 -3
- package/dist/{create-_noSrY1T.js → create-BLPKnJKa.js} +23 -7
- package/dist/{create-BSNrVuxh.d.ts → create-BPUopdfL.d.ts} +7 -7
- package/dist/{create-CM1FciYG.d.ts → create-BamXmeob.d.ts} +6 -6
- package/dist/{create-BVq1lNQE.d.ts → create-DBvUsgzK.d.ts} +4 -4
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-CHNlVInN.d.ts → denied-text-DHldhVUv.d.ts} +1 -1
- package/dist/{describe-ByS9LgHK.d.ts → describe-BbFPBSms.d.ts} +1 -1
- package/dist/{diff-CN8IYhC_.js → diff-BwR1JdP2.js} +1 -1
- package/dist/{diff-iZWV65nC.js → diff-CQegtBAo.js} +2 -2
- package/dist/{doctor-CHD1M9R5.js → doctor-ClRVAtXQ.js} +13 -13
- package/dist/{doctor-D3wo-yuz.js → doctor-LPMYjSqO.js} +2 -2
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +1 -1
- package/dist/{errors-zi_4T-rx.d.ts → errors-BIM4MFsJ.d.ts} +1 -1
- package/dist/{evaluate-Dd8Ta0Ie.js → evaluate-BAmf_AQd.js} +13 -4
- package/dist/{evaluations-z8dQFDaN.d.ts → evaluations-DOWuBpWv.d.ts} +3 -3
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +2 -2
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +1 -1
- package/dist/{fetch-adapter-C1DCvpqV.d.ts → fetch-adapter-BIbBAtPZ.d.ts} +2 -2
- package/dist/{fetch-adapter-JL43jD3E.js → fetch-adapter-dPTgJVHd.js} +1 -1
- package/dist/{gen-B5kvbAoZ.js → gen-BFfzZSLH.js} +1 -1
- package/dist/{gen-DWCYcMQM.js → gen-BtfFWGbz.js} +2 -2
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +2 -2
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +1 -1
- package/dist/{hosted-Cmtxogd0.d.ts → hosted-DVxlLZMe.d.ts} +1 -1
- package/dist/{import-_YqhhwvX.js → import-ACkOrv6g.js} +1 -1
- package/dist/{index-BhxEUY9J.d.ts → index-BinlXeU-.d.ts} +2 -2
- package/dist/{index-B8s204GL.d.ts → index-CV-7DWeD.d.ts} +4 -4
- package/dist/{index-_9UiQIkt.d.ts → index-DJwEgYzA.d.ts} +4 -4
- package/dist/{index-BT5-1VsX.d.ts → index-Dj2qF9VC.d.ts} +1 -1
- package/dist/{index-BW_0MZOS.d.ts → index-vYjMrXyK.d.ts} +62 -9
- package/dist/{index-Bv5iXPqU.d.ts → index-ymept53A.d.ts} +4 -4
- package/dist/index.d.ts +15 -15
- package/dist/index.js +6 -6
- package/dist/{init-cE3A8aXq.js → init-BjuFDYT1.js} +1 -1
- package/dist/{init-Dz_PsHdv.js → init-txYTuW9u.js} +3 -3
- package/dist/{instance-options-B0KXqTrJ.d.ts → instance-options-CoHn-0e8.d.ts} +1 -1
- package/dist/{instance-snapshot--JWiTrvO.js → instance-snapshot-DuWf1cT3.js} +13 -8
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +1 -1
- package/dist/{kernel-C-fYydV2.js → kernel-qv4cr9w8.js} +4 -4
- package/dist/kysely/index.d.ts +3 -3
- package/dist/{login-D-8tMqzo.js → login-CfImTJGb.js} +3 -3
- package/dist/{login-DplQ0s84.js → login-CgfCTO3F.js} +1 -1
- package/dist/{manifest-Cgiq5oqc.js → manifest-B2QPh19C.js} +35 -35
- package/dist/{map-claims-BNWCJtmP.js → map-claims-C-nv08_n.js} +2 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +4 -4
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +16 -9
- package/dist/next/index.js +14 -7
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +1 -1
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-VeHHU2l9.js → openapi-BGeuunWC.js} +1 -1
- package/dist/{openapi-CBZUhA3l.js → openapi-BIpw3Mb7.js} +2 -2
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +3 -3
- package/dist/{output-tkju6U7R.js → output-DV5dwOTs.js} +1 -1
- package/dist/{ownership-B4L59T9u.js → ownership-DA5YdYTm.js} +9 -4
- package/dist/{parse-local-manifest-BQhTlLQS.d.ts → parse-local-manifest-CCmbhnxP.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-L-_I_3zP.js → permdock-BvjivVb9.js} +143 -107
- package/dist/{permdock-B6Sf4T_S.d.ts → permdock-CprAPN3w.d.ts} +9 -2
- package/dist/{permissions-mDcTWoBs.js → permissions-CYcHj_w7.js} +1 -1
- package/dist/{policy-Ba4bDhaj.d.ts → policy-BycVKnXv.d.ts} +1 -1
- package/dist/{policy-from-catalog-CJgOm6aq.js → policy-from-catalog-CU3An8uP.js} +1 -1
- package/dist/{policy-types-CCiDRZBH.d.ts → policy-types-DGIO_gxq.d.ts} +54 -18
- package/dist/{postgrest-D4nuPXIQ.js → postgrest-5Dr3W64L.js} +34 -55
- package/dist/{postgrest-DicQyqm-.d.ts → postgrest-D5nUGm-c.d.ts} +4 -3
- package/dist/powersync-B701tvhE.js +1 -0
- package/dist/{powersync-DXqGuq9A.js → powersync-Bg8u-JcR.js} +2 -2
- package/dist/{powersync-DHNQX06W.js → powersync-CJrT1DSc.js} +5 -5
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{protected-action-BE7N_Luo.d.ts → protected-action-D8x73IGm.d.ts} +6 -6
- package/dist/{provider-DXfq5c2d.d.ts → provider-DfLeek9O.d.ts} +1 -1
- package/dist/{pull-CwpGaQSi.js → pull-2nJr0qg_.js} +1 -1
- package/dist/pull-C3EEGzSw.js +1 -0
- package/dist/{push-DgssgzkK.js → push-Bn-lMEmI.js} +2 -2
- package/dist/{pushed-policy-ITwYKvvH.js → pushed-policy-CDuOL2de.js} +1 -1
- package/dist/{pushed-policy-D1Eoi6NM.d.ts → pushed-policy-CryQheKq.d.ts} +1 -1
- package/dist/react/index.d.ts +7 -7
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react-native/index.d.ts +9 -9
- package/dist/{replay-DNftIb_R.d.ts → replay-Bs9Df2fQ.d.ts} +1 -1
- package/dist/{request-context-C25ilqiJ.js → request-context-Duzdf0cd.js} +1 -1
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-CF7xXLSG.js → resolve-names-ConCSj1y.js} +1 -1
- package/dist/{rls-Ca8Jz9b5.js → rls-Ba9wN0SP.js} +1 -1
- package/dist/{rls-CNEH2_BG.js → rls-Cx0dtsB7.js} +20 -13
- package/dist/{rpc-fNqAIqQk.js → rpc-vHIwyXCp.js} +1 -1
- package/dist/run-Ck22anC2.js +1 -0
- package/dist/{run-Bz26OTfO.js → run-PbRlXTfh.js} +2 -2
- package/dist/{run-ticket-DbWI9f99.d.ts → run-ticket-B2o2Kxz8.d.ts} +2 -2
- package/dist/{saas-iWnUdwCt.js → saas-DK4V-3Is.js} +2 -2
- package/dist/{scan-DCj1KQfn.js → scan-CRTj6fke.js} +1 -1
- package/dist/{schema-Dst9I9Gs.js → schema-BTsE1WRT.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +1 -1
- package/dist/{server-types-CIlpSA2G.d.ts → server-types-CyRN0-Cd.d.ts} +15 -8
- package/dist/{sink-Dvi7YZG_.d.ts → sink-B5zoUW_O.d.ts} +2 -2
- package/dist/{skills-OuoMR49L.js → skills-C9uKfSF5.js} +1 -1
- package/dist/{skills-Bjj7BNEQ.js → skills-CQQcuGBi.js} +1 -1
- package/dist/{snapshot-cache-BAXZ0KOp.d.ts → snapshot-cache-BjAWkchD.d.ts} +1 -1
- package/dist/solid/index.d.ts +6 -6
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +2 -2
- package/dist/{sources-B1Os_YUu.d.ts → sources-CWG32C0G.d.ts} +2 -2
- package/dist/{src-DZ0l9UAg.js → src-C_pi2Rnh.js} +106 -5
- package/dist/ssf/index.d.ts +3 -3
- package/dist/{standard-webhooks-C-qX4mJW.d.ts → standard-webhooks-DOYEuOLx.d.ts} +2 -2
- package/dist/{stores-C0Kta5Ft.d.ts → stores-DZJvxFIZ.d.ts} +6 -6
- package/dist/{stream-ltuLdtTG.d.ts → stream-9y9qw51m.d.ts} +1 -1
- package/dist/supabase/index.d.ts +5 -5
- package/dist/supabase/index.js +2 -2
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +4 -4
- package/dist/{supabase-BL1qJzzY.js → supabase-DnMMg5Fn.js} +1 -1
- package/dist/{supabase-D39cuGPt.js → supabase-SBs3MYUE.js} +2 -2
- package/dist/supabase-hook-C0FyEACZ.js +1 -0
- package/dist/{supabase-hook-B-yXnzUl.js → supabase-hook-CrgU06WH.js} +5 -5
- package/dist/{supautils-BU-pAEpf.js → supautils-ByezN3b8.js} +244 -197
- package/dist/svelte/index.d.ts +6 -6
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/source.d.ts +6 -6
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +1 -1
- package/dist/{tables-DeMNEy6V.js → tables-BqrxBCir.js} +1 -1
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +1 -1
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +2 -2
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/index.d.ts +21 -20
- package/dist/testing/index.js +61 -8
- package/dist/testing/saas/index.d.ts +3 -3
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +2 -2
- package/dist/{type-helpers-BIPIDa6a.d.ts → type-helpers-c7Xo_2Cu.d.ts} +1 -1
- package/dist/{types-B2mlGuhW.d.ts → types-B2efzoSX.d.ts} +1 -1
- package/dist/{types-DHKPcqzr.d.ts → types-B6ExllNo.d.ts} +2 -2
- package/dist/{types-AMJ5qoU_.d.ts → types-BB-zWDcR.d.ts} +4 -4
- package/dist/{types-ah9NlU6j.d.ts → types-BMVDHvI0.d.ts} +1 -1
- package/dist/{types-djVzLlIV.d.ts → types-CEinc15V.d.ts} +4 -4
- package/dist/{types-yUuPR5Hy.d.ts → types-CN0LsqbK.d.ts} +3 -3
- package/dist/{types-HzqOtvsJ.d.ts → types-CWBsAwqn.d.ts} +4 -4
- package/dist/{types-DC1Loeh3.d.ts → types-CzOeVvcC.d.ts} +5 -3
- package/dist/{types-B_tiYvk8.d.ts → types-DLvhVm1r.d.ts} +1 -1
- package/dist/{types-B4uqKDnp.d.ts → types-DlelvQk4.d.ts} +2 -2
- package/dist/{types-DjuMBNF9.d.ts → types-DsHGPtkR.d.ts} +2 -2
- package/dist/{types-BJk0BKRX.d.ts → types-rCRV4Ge-.d.ts} +4 -4
- package/dist/{types-B_d_g7T3.d.ts → types-tQB2CEnY.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/usage-0hjZPIRX.js +1 -0
- package/dist/{usage-CxEzS4ey.js → usage-B9EtHWLa.js} +3 -3
- package/dist/{usage-ab0PdusX.js → usage-CBzgwfIs.js} +1 -1
- package/dist/{validation-error-YGg2mXyH.d.ts → validation-error-uvp-kyfO.d.ts} +1 -1
- package/dist/{verify-DZeqoWu5.js → verify-DlUcTDBz.js} +6 -6
- package/dist/vue/index.d.ts +6 -6
- package/dist/{waiter-Bu9zAlE0.d.ts → waiter-CqUKX6CY.d.ts} +2 -2
- package/dist/{watch-Cx_WciLE.js → watch-BFDKqmUa.js} +1 -1
- package/dist/watch-ClLuO2TL.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/{who-can-rI7dCR9Q.js → who-can-BoDJm0Nc.js} +1 -1
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-DlJE3gS_.d.ts → wrap-DxXB54Wu.d.ts} +2 -2
- package/package.json +2 -2
- package/skills/permdock-data/references/queries-and-rls.md +1 -1
- package/skills/permdock-wire/references/adapters.md +2 -1
- package/dist/catalog-mRQQQhNK.js +0 -1
- package/dist/collect-B5BL3klN.js +0 -1
- package/dist/powersync-Djf-zCpB.js +0 -1
- package/dist/pull-B65ndFNZ.js +0 -1
- package/dist/run-D-JE8QWb.js +0 -1
- package/dist/supabase-hook-H-MtE9Wd.js +0 -1
- package/dist/usage-CYeXek0p.js +0 -1
- package/dist/watch-DB42U1ib.js +0 -1
|
@@ -429,6 +429,12 @@ type Subject<TPrincipal extends Principal = Principal> = {
|
|
|
429
429
|
readonly context: Readonly<Record<string, unknown>>;
|
|
430
430
|
readonly session?: string;
|
|
431
431
|
readonly expiresAt?: number;
|
|
432
|
+
/**
|
|
433
|
+
* When the verified token was issued (`iat`), in seconds since the epoch. A
|
|
434
|
+
* `VersionCache` trusts the token's `authzVersion` for its `maxStaleMs` after
|
|
435
|
+
* it.
|
|
436
|
+
*/
|
|
437
|
+
readonly issuedAt?: number;
|
|
432
438
|
/**
|
|
433
439
|
* The token's memberships are behind the source's authorization version:
|
|
434
440
|
* `fresh` permissions deny.
|
|
@@ -1708,6 +1714,28 @@ type DecisionProvider = {
|
|
|
1708
1714
|
readonly subject: Subject;
|
|
1709
1715
|
}) => Promise<readonly string[] | null | undefined>;
|
|
1710
1716
|
};
|
|
1717
|
+
/**
|
|
1718
|
+
* Shares one read per key within one `getPermDock` call: the first call runs
|
|
1719
|
+
* `read`, every later call with the same key gets its answer. A source created
|
|
1720
|
+
* once at module scope uses it so the reads of one instance share a single
|
|
1721
|
+
* query and no answer outlives the instance.
|
|
1722
|
+
*/
|
|
1723
|
+
type SourceMemo = <T>(key: string, read: () => T) => T;
|
|
1724
|
+
/** What `getPermDock` passes to every source call besides its query. */
|
|
1725
|
+
type SourceContext = {
|
|
1726
|
+
/** Absent when the source is called outside `getPermDock`. */
|
|
1727
|
+
readonly memo?: SourceMemo;
|
|
1728
|
+
};
|
|
1729
|
+
/**
|
|
1730
|
+
* Whether an instance answers reads or writes: `read` may judge a token fresh
|
|
1731
|
+
* from a shared `VersionCache` within its `maxStaleMs`; `write` reads the
|
|
1732
|
+
* version live.
|
|
1733
|
+
*/
|
|
1734
|
+
type Intent = "read" | "write";
|
|
1735
|
+
/** The custom-role sources' second argument. */
|
|
1736
|
+
type CustomRoleContext = SourceContext & {
|
|
1737
|
+
readonly held: readonly string[];
|
|
1738
|
+
};
|
|
1711
1739
|
type CustomRoleSource = {
|
|
1712
1740
|
/** Names the implementation in errors and events. */
|
|
1713
1741
|
readonly name?: string;
|
|
@@ -1716,27 +1744,21 @@ type CustomRoleSource = {
|
|
|
1716
1744
|
* the subject's live memberships hold there, declared or not, so a source can
|
|
1717
1745
|
* skip its read when none of them is a custom role.
|
|
1718
1746
|
*/
|
|
1719
|
-
rolesFor: (tenant: string, context?:
|
|
1720
|
-
readonly held: readonly string[];
|
|
1721
|
-
}) => CustomRole[] | Promise<CustomRole[]>;
|
|
1747
|
+
rolesFor: (tenant: string, context?: CustomRoleContext) => CustomRole[] | Promise<CustomRole[]>;
|
|
1722
1748
|
assignable?: (tenant: string) => string[] | Promise<string[]>;
|
|
1723
1749
|
/**
|
|
1724
1750
|
* Platform custom roles (`scope: 'global'`), read once per signed-in subject,
|
|
1725
1751
|
* with `held`, the global role names the subject holds. A role here with a
|
|
1726
1752
|
* tenant is ignored.
|
|
1727
1753
|
*/
|
|
1728
|
-
globalRoles?: (context?:
|
|
1729
|
-
readonly held: readonly string[];
|
|
1730
|
-
}) => CustomRole[] | Promise<CustomRole[]>;
|
|
1754
|
+
globalRoles?: (context?: CustomRoleContext) => CustomRole[] | Promise<CustomRole[]>;
|
|
1731
1755
|
/**
|
|
1732
1756
|
* Shared custom roles (`shared: true`), defined once for every tenant and
|
|
1733
1757
|
* read once per subject with a tenant membership, with `held`, the role names
|
|
1734
1758
|
* its live memberships hold in any tenant. A role here without `shared: true`
|
|
1735
1759
|
* is ignored.
|
|
1736
1760
|
*/
|
|
1737
|
-
sharedRoles?: (context?:
|
|
1738
|
-
readonly held: readonly string[];
|
|
1739
|
-
}) => CustomRole[] | Promise<CustomRole[]>;
|
|
1761
|
+
sharedRoles?: (context?: CustomRoleContext) => CustomRole[] | Promise<CustomRole[]>;
|
|
1740
1762
|
};
|
|
1741
1763
|
/**
|
|
1742
1764
|
* A `CustomRoleSource` built for the subject the instance serves, for an
|
|
@@ -1746,6 +1768,23 @@ type CustomRoleSource = {
|
|
|
1746
1768
|
* `source-threw`.
|
|
1747
1769
|
*/
|
|
1748
1770
|
type CustomRoleSourceFactory = (subject: Subject) => CustomRoleSource | undefined;
|
|
1771
|
+
/**
|
|
1772
|
+
* The principal `MembershipSource.version` is asked about: what its token
|
|
1773
|
+
* claims.
|
|
1774
|
+
*/
|
|
1775
|
+
type VersionQuery = {
|
|
1776
|
+
readonly id: string;
|
|
1777
|
+
readonly roles?: readonly string[];
|
|
1778
|
+
readonly memberships?: readonly Membership[];
|
|
1779
|
+
readonly authzVersion?: number;
|
|
1780
|
+
/** When the token was issued, in seconds since the epoch (`iat`). */
|
|
1781
|
+
readonly issuedAt?: number;
|
|
1782
|
+
};
|
|
1783
|
+
/** `MembershipSource.version`'s second argument. */
|
|
1784
|
+
type VersionContext = SourceContext & {
|
|
1785
|
+
/** Absent outside `getPermDock`, where the read is live. */
|
|
1786
|
+
readonly intent?: Intent;
|
|
1787
|
+
};
|
|
1749
1788
|
/** One member of a scope instance, as `MembershipSource.list` returns it. */
|
|
1750
1789
|
type MemberEntry = {
|
|
1751
1790
|
readonly principal: {
|
|
@@ -1759,7 +1798,7 @@ type MembershipSource = {
|
|
|
1759
1798
|
membershipsFor: (principal: {
|
|
1760
1799
|
readonly id: string;
|
|
1761
1800
|
readonly kind?: string;
|
|
1762
|
-
}, options: {
|
|
1801
|
+
}, options: SourceContext & {
|
|
1763
1802
|
readonly tenant?: string;
|
|
1764
1803
|
}) => Membership[] | Promise<Membership[]>;
|
|
1765
1804
|
/**
|
|
@@ -1775,13 +1814,10 @@ type MembershipSource = {
|
|
|
1775
1814
|
* change. A token whose `authzVersion` is behind it is stale for the policy's
|
|
1776
1815
|
* `fresh` permissions. `roles` and `memberships` are what the token claims,
|
|
1777
1816
|
* so a source can read more than the version in the same call when the claims
|
|
1778
|
-
* show it will be needed.
|
|
1817
|
+
* show it will be needed. `authzVersion` and `issuedAt` (seconds) are the
|
|
1818
|
+
* token's, for a `VersionCache`.
|
|
1779
1819
|
*/
|
|
1780
|
-
version?: (principal:
|
|
1781
|
-
readonly id: string;
|
|
1782
|
-
readonly roles?: readonly string[];
|
|
1783
|
-
readonly memberships?: readonly Membership[];
|
|
1784
|
-
}) => number | undefined | Promise<number | undefined>;
|
|
1820
|
+
version?: (principal: VersionQuery, context?: VersionContext) => number | undefined | Promise<number | undefined>;
|
|
1785
1821
|
/**
|
|
1786
1822
|
* The global roles the principal holds now. With `onStale: 'reread'`, a stale
|
|
1787
1823
|
* token's `principal.roles` is replaced by this answer, so a revoked platform
|
|
@@ -1791,7 +1827,7 @@ type MembershipSource = {
|
|
|
1791
1827
|
globalRolesFor?: (principal: {
|
|
1792
1828
|
readonly id: string;
|
|
1793
1829
|
readonly kind?: string;
|
|
1794
|
-
}) => readonly string[] | Promise<readonly string[]>;
|
|
1830
|
+
}, context?: SourceContext) => readonly string[] | Promise<readonly string[]>;
|
|
1795
1831
|
/**
|
|
1796
1832
|
* Keep the memberships the verified token carries and read this source only
|
|
1797
1833
|
* when the token says they were truncated (`claimsFirst`).
|
|
@@ -2640,4 +2676,4 @@ type SubjectOf<P> = {
|
|
|
2640
2676
|
readonly expiresAt?: number;
|
|
2641
2677
|
};
|
|
2642
2678
|
//#endregion
|
|
2643
|
-
export {
|
|
2679
|
+
export { LimitRemaining as $, Quota as $n, SnapshotGrant as $t, PolicyScopes as A, Grantee as An, SqlFunctionCondition as Ar, CredentialDecision as At, ValidateMode as B, relation as Bn, decideCredential as Bt, MembershipFixture as C, ApproverInput as Cn, MemberOfCondition as Cr, SupportSessionDecision as Ct, PolicyDelegation as D, anyOf as Dn, RelatedHop as Dr, parseSupportSession as Dt, PolicyAppDataSchemas as E, allOf as En, RelatedCondition as Er, decideSupportSession as Et, RoleScope as F, anyone as Fn, isSqlFunctionField as Fr, CredentialPolicyViolation as Ft, CustomRoleSource as G, DenialDetails as Gn, LocalCustomRoleTable as Gt, WireValidity as H, ApprovalRequiredDecision as Hn, parseCredential as Ht, SeparationConflict as I, assurance as In, CredentialRequest as It, DecisionSink as J, ExplainedDecision as Jn, LocalRowValue as Jt, CustomRoleSourceFactory as K, DenialReason as Kn, LocalMembershipRows as Kt, SubjectOf as L, authenticated as Ln, DecideCredentialOptions as Lt, PrincipalOf as M, InheritGrantee as Mn, isCondition as Mr, CredentialPermission as Mt, RoleBinding as N, RelationGrantee as Nn, isConditionDate as Nr, CredentialPermissionInput as Nt, PolicyOAuthScope as O, holder as On, RestrictedAncestors as Or, ApiKeyPrincipal as Ot, RoleOptions as P, actor as Pn, isConditionRef as Pr, CredentialPolicy as Pt, LimitConsumeInput as Q, Obligation as Qn, SnapshotAssignable as Qt, SupportAccessOptions as R, inherit as Rn, credentialDelegation as Rt, HostedGrantRef as S, Approver as Sn, ConditionValue as Sr, SupportSession as St, Policy as T, UserApprover as Tn, OpaqueCondition as Tr, SupportSessionRequest as Tt, CredentialVerifier as U, Decision as Un, InstanceHandle as Ut, VocabularyFromInput as V, AppObligation as Vn, isFeedId as Vt, CustomRoleContext as W, Denial as Wn, Instant as Wt, Intent as X, LimitDetail as Xn, LocalSnapshotRows as Xt, EntitlementSource as Y, GrantedDecision as Yn, LocalSnapshotManifest as Yt, JwtClaims as Z, MatchedGrant as Zn, Snapshot as Zt, GrantLimit as _, PolicyScopesInput as _n, ActorKind as _r, VerifiedToken as _t, ApprovalRequirement as a, CredentialEvent as an, AuthorizationDetail as ar, RelationHolder as at, GrantScope as b, ScopeNames as bn, Condition as br, WhereCompiler as bt, BreakGlassOptions as c, DeliveryEvent as cn, CustomRoleGrant as cr, SnapshotSource as ct, ClosureContext as d, EmailCategory as dn, JsonWebKeyLike as dr, SubjectResolver as dt, SnapshotNotEntitled as en, Trace as er, LimitStore as et, ClosureGrantFn as f, MembershipEvent as fn, Membership as fr, TenantSettings as ft, GrantCondition as g, WireDelegation as gn, VerifiedClaims as gr, VerificationFailure as gt, Grant as h, WireDenial as hn, Subject as hr, TokenVerifier as ht, ApprovalOption as i, AutomationEvent as in, Assurance as ir, RelationGroup as it, PolicyVocabulary as j, GranteeInput as jn, hasConditionOp as jr, CredentialKind as jt, PolicyOptions as k, user as kn, SqlFunctionArg as kr, Credential as kt, BreakGlassRequirements as l, DeliveryFailureCause as ln, Delegation as lr, SourceContext as lt, DelegationTarget as m, WireDecision as mn, SharedCustomRole as mr, TokenSigner as mt, ApprovalEscalation as n, AccessEvent as nn, TraceSkipReason as nr, MembershipSource as nt, ApprovalStage as o, DecisionEvent as on, Binding as or, RelationSource as ot, DelegationInput as p, SinkEvent as pn, Principal as pr, TokenFailureCause as pt, DecisionProvider as q, DeniedDecision as qn, LocalRowColumn as qt, ApprovalMode as r, AuthEvent as rn, Actor as rr, RelationChain as rt, AssuranceRequirement as s, DeliveryChannel as sn, CustomRole as sr, SettingsSource as st, ActivationOption as t, SnapshotScope as tn, TraceSkip as tr, MemberEntry as tt, BreakGlassSpec as u, DirectoryEvent as un, GnapAccess as ur, SourceMemo as ut, GrantMeta as v, Scope as vn, AdapterId as vr, VersionContext as vt, ObligationInput as w, PermissionApprover as wn, MemberOfParent as wr, SupportSessionPolicy as wt, GrantValidity as x, AnyOfApprover as xn, ConditionRef as xr, DecideSupportSessionOptions as xt, GrantOptions as y, ScopeDeclaration as yn, MembershipVia as yr, VersionQuery as yt, SupportConsent as z, plan as zn, credentialPolicyViolation as zt };
|
|
@@ -361,6 +361,7 @@ function mapClaims(claims, options) {
|
|
|
361
361
|
});
|
|
362
362
|
const session = typeof claims["session_id"] === "string" ? claims["session_id"] : void 0;
|
|
363
363
|
const expiresAt = typeof claims["exp"] === "number" ? claims["exp"] : void 0;
|
|
364
|
+
const issuedAt = typeof claims["iat"] === "number" && Number.isFinite(claims["iat"]) ? claims["iat"] : void 0;
|
|
364
365
|
return freezeDeep(compact({
|
|
365
366
|
principal,
|
|
366
367
|
actor,
|
|
@@ -368,6 +369,7 @@ function mapClaims(claims, options) {
|
|
|
368
369
|
context: {},
|
|
369
370
|
session,
|
|
370
371
|
expiresAt,
|
|
372
|
+
issuedAt,
|
|
371
373
|
liveSession: options.liveSession === true && session !== void 0 ? true : void 0
|
|
372
374
|
}));
|
|
373
375
|
}
|
|
@@ -485,6 +487,9 @@ function readSubjectRecord(value) {
|
|
|
485
487
|
claims: isRecord(value["claims"]) && Object.keys(value["claims"]).length > 0 ? value["claims"] : void 0
|
|
486
488
|
});
|
|
487
489
|
}
|
|
490
|
+
function once(memo, key, read) {
|
|
491
|
+
return memo === void 0 ? read() : memo(key, read);
|
|
492
|
+
}
|
|
488
493
|
/**
|
|
489
494
|
* Membership, custom-role and subject sources over the `subject_for(p_user)`,
|
|
490
495
|
* `authz_version_for(p_user)` and `members_of(p_scope, p_id)` functions
|
|
@@ -494,8 +499,9 @@ function readSubjectRecord(value) {
|
|
|
494
499
|
* stale token; when the version function is missing it falls back to
|
|
495
500
|
* `subject_for`. With `policy`, a token that claims a custom role has its
|
|
496
501
|
* subject read in one `subject_for` call instead, and custom roles are read
|
|
497
|
-
* only for a subject that holds one.
|
|
498
|
-
*
|
|
502
|
+
* only for a subject that holds one. It keeps no answers: create it once at
|
|
503
|
+
* module scope, and `getPermDock` shares each read within one instance. Pass
|
|
504
|
+
* `claimsFirst(…, { versions })` to share version reads across instances.
|
|
499
505
|
*/
|
|
500
506
|
function postgrestSources(client, options = {}) {
|
|
501
507
|
const api = options.api;
|
|
@@ -506,73 +512,46 @@ function postgrestSources(client, options = {}) {
|
|
|
506
512
|
const versionFn = options.versionFn ?? names?.authzVersionFor ?? "authz_version_for";
|
|
507
513
|
const declared = options.policy === void 0 ? void 0 : options.policy.index.declaredRoles;
|
|
508
514
|
const onlyDeclared = (held) => declared !== void 0 && held?.every((name) => declared.has(name)) === true;
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
const listed = /* @__PURE__ */ new Map();
|
|
512
|
-
const list = (query) => {
|
|
513
|
-
const key = JSON.stringify([query.scope, query.id]);
|
|
514
|
-
const cached = listed.get(key);
|
|
515
|
-
if (cached !== void 0) return cached.then((entries) => [...entries]);
|
|
516
|
-
const pending = Promise.resolve(callRpc(client, schema, membersFn, {
|
|
515
|
+
const list = async (query) => {
|
|
516
|
+
const result = await callRpc(client, schema, membersFn, {
|
|
517
517
|
p_scope: query.scope,
|
|
518
518
|
p_id: query.id
|
|
519
|
-
})).then((result) => {
|
|
520
|
-
if (result.error !== null) throw new Error(`PermDock: ${schema}.${membersFn} failed: ${result.error.message}`);
|
|
521
|
-
return readMemberEntries(result.data);
|
|
522
|
-
});
|
|
523
|
-
listed.set(key, pending);
|
|
524
|
-
return pending.then((entries) => [...entries]);
|
|
525
|
-
};
|
|
526
|
-
const record = (userId) => {
|
|
527
|
-
const cached = loaded.get(userId);
|
|
528
|
-
if (cached !== void 0) return cached;
|
|
529
|
-
const pending = Promise.resolve(callRpc(client, schema, fn, { p_user: userId })).then((result) => {
|
|
530
|
-
if (result.error !== null) throw new Error(`PermDock: ${schema}.${fn} failed: ${result.error.message}`);
|
|
531
|
-
return readSubjectRecord(result.data);
|
|
532
519
|
});
|
|
533
|
-
|
|
534
|
-
return
|
|
535
|
-
};
|
|
536
|
-
const version = (userId) => {
|
|
537
|
-
const read = loaded.get(userId);
|
|
538
|
-
if (read !== void 0) return read.then((found) => found?.authzVersion);
|
|
539
|
-
const cached = versions.get(userId);
|
|
540
|
-
if (cached !== void 0) return cached;
|
|
541
|
-
const pending = Promise.resolve(callRpc(client, schema, versionFn, { p_user: userId })).then((result) => result.error === null ? versionOf(result.data) : record(userId).then((found) => found?.authzVersion));
|
|
542
|
-
versions.set(userId, pending);
|
|
543
|
-
return pending;
|
|
520
|
+
if (result.error !== null) throw new Error(`PermDock: ${schema}.${membersFn} failed: ${result.error.message}`);
|
|
521
|
+
return readMemberEntries(result.data);
|
|
544
522
|
};
|
|
545
|
-
const
|
|
546
|
-
const
|
|
523
|
+
const record = (userId, memo) => once(memo, `${schema}.${fn}:${userId}`, async () => {
|
|
524
|
+
const result = await callRpc(client, schema, fn, { p_user: userId });
|
|
525
|
+
if (result.error !== null) throw new Error(`PermDock: ${schema}.${fn} failed: ${result.error.message}`);
|
|
526
|
+
return readSubjectRecord(result.data);
|
|
527
|
+
});
|
|
528
|
+
const version = (userId, memo) => once(memo, `${schema}.${versionFn}:${userId}`, async () => {
|
|
529
|
+
const result = await callRpc(client, schema, versionFn, { p_user: userId });
|
|
530
|
+
return result.error === null ? versionOf(result.data) : (await record(userId, memo))?.authzVersion;
|
|
531
|
+
});
|
|
532
|
+
const live = async (userId, memo) => {
|
|
533
|
+
const found = await record(userId, memo);
|
|
547
534
|
return found?.active === true ? found : void 0;
|
|
548
535
|
};
|
|
549
536
|
return {
|
|
550
537
|
memberships: {
|
|
551
|
-
async membershipsFor(principal) {
|
|
552
|
-
return [...(await live(principal.id))?.memberships ?? []];
|
|
538
|
+
async membershipsFor(principal, query) {
|
|
539
|
+
return [...(await live(principal.id, query.memo))?.memberships ?? []];
|
|
553
540
|
},
|
|
554
|
-
version(principal) {
|
|
555
|
-
return declared !== void 0 && !onlyDeclared([...principal.roles ?? [], ...(principal.memberships ?? []).flatMap((membership) => membership.roles)]) ? record(principal.id).then((found) => found?.authzVersion) : version(principal.id);
|
|
541
|
+
version(principal, context) {
|
|
542
|
+
return declared !== void 0 && !onlyDeclared([...principal.roles ?? [], ...(principal.memberships ?? []).flatMap((membership) => membership.roles)]) ? record(principal.id, context?.memo).then((found) => found?.authzVersion) : version(principal.id, context?.memo);
|
|
556
543
|
},
|
|
557
544
|
list,
|
|
558
|
-
async globalRolesFor(principal) {
|
|
559
|
-
return [...(await live(principal.id))?.roles ?? []];
|
|
545
|
+
async globalRolesFor(principal, context) {
|
|
546
|
+
return [...(await live(principal.id, context?.memo))?.roles ?? []];
|
|
560
547
|
}
|
|
561
548
|
},
|
|
562
549
|
customRoles(principal) {
|
|
550
|
+
const held = async (context, keep) => onlyDeclared(context?.held) ? [] : ((await live(principal.id, context?.memo))?.customRoles ?? []).filter(keep);
|
|
563
551
|
return {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
},
|
|
568
|
-
async globalRoles(context) {
|
|
569
|
-
if (onlyDeclared(context?.held)) return [];
|
|
570
|
-
return ((await live(principal.id))?.customRoles ?? []).filter((role) => role.scope === "global");
|
|
571
|
-
},
|
|
572
|
-
async sharedRoles(context) {
|
|
573
|
-
if (onlyDeclared(context?.held)) return [];
|
|
574
|
-
return ((await live(principal.id))?.customRoles ?? []).filter((role) => role.shared === true);
|
|
575
|
-
}
|
|
552
|
+
rolesFor: (tenant, context) => held(context, (role) => role.tenant === tenant),
|
|
553
|
+
globalRoles: (context) => held(context, (role) => role.scope === "global"),
|
|
554
|
+
sharedRoles: (context) => held(context, (role) => role.shared === true)
|
|
576
555
|
};
|
|
577
556
|
},
|
|
578
557
|
async subject(userId) {
|
|
@@ -620,7 +599,7 @@ function postgrestSources(client, options = {}) {
|
|
|
620
599
|
principal
|
|
621
600
|
};
|
|
622
601
|
},
|
|
623
|
-
record
|
|
602
|
+
record: (userId) => record(userId)
|
|
624
603
|
};
|
|
625
604
|
}
|
|
626
605
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as CustomRoleSource, T as Policy, fr as Membership, hr as Subject, nt as MembershipSource, pr as Principal, sr as CustomRole, tt as MemberEntry } from "./policy-types-DGIO_gxq.js";
|
|
2
2
|
//#region src/supabase/postgrest.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* What a supabase-js `rpc` call resolves to: `data` or an `error` with a
|
|
@@ -122,8 +122,9 @@ declare function readSubjectRecord(value: unknown): SubjectRecord | undefined;
|
|
|
122
122
|
* stale token; when the version function is missing it falls back to
|
|
123
123
|
* `subject_for`. With `policy`, a token that claims a custom role has its
|
|
124
124
|
* subject read in one `subject_for` call instead, and custom roles are read
|
|
125
|
-
* only for a subject that holds one.
|
|
126
|
-
*
|
|
125
|
+
* only for a subject that holds one. It keeps no answers: create it once at
|
|
126
|
+
* module scope, and `getPermDock` shares each read within one instance. Pass
|
|
127
|
+
* `claimsFirst(…, { versions })` to share version reads across instances.
|
|
127
128
|
*/
|
|
128
129
|
declare function postgrestSources(client: SupabaseRpcCaller, options?: PostgrestSourcesOptions): PostgrestSources;
|
|
129
130
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as runPowerSync } from "./powersync-CJrT1DSc.js";
|
|
@@ -14,7 +14,7 @@ const generate = defineLeaf({
|
|
|
14
14
|
async run(ctx, { flags }) {
|
|
15
15
|
const out = fileOut("powersync", flags.out);
|
|
16
16
|
const from = given(flags.policy);
|
|
17
|
-
const { runPowerSync } = await import("./powersync-
|
|
17
|
+
const { runPowerSync } = await import("./powersync-B701tvhE.js");
|
|
18
18
|
return runPowerSync({
|
|
19
19
|
cwd: ctx.cwd,
|
|
20
20
|
config: ctx.config,
|
|
@@ -45,7 +45,7 @@ const verify = defineLeaf({
|
|
|
45
45
|
const db = await dbUrl(ctx, flags, { required: true });
|
|
46
46
|
const fixtures = given(flags.fixtures);
|
|
47
47
|
const from = given(flags.policy);
|
|
48
|
-
const { runPowerSync } = await import("./powersync-
|
|
48
|
+
const { runPowerSync } = await import("./powersync-B701tvhE.js");
|
|
49
49
|
return runPowerSync({
|
|
50
50
|
cwd: ctx.cwd,
|
|
51
51
|
config: ctx.config,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { c as isConditionDate, l as isConditionRef } from "./refs-C8BKxc_e.js";
|
|
3
|
-
import {
|
|
3
|
+
import { g as localSnapshotManifest, j as memoryCustomRoleSource } from "./src-C_pi2Rnh.js";
|
|
4
4
|
import { n as findPermission } from "./permission-registry-B8tYxPIt.js";
|
|
5
5
|
import { f as scopeList, s as resolveScope } from "./scopes-0Up_UA2t.js";
|
|
6
6
|
import { l as policyLevels } from "./policy-CLQ8__GF.js";
|
|
7
7
|
import { t as requiresApproval } from "./approval-required-TzNB9oQA.js";
|
|
8
|
-
import { t as getPermDock } from "./permdock-
|
|
8
|
+
import { t as getPermDock } from "./permdock-BvjivVb9.js";
|
|
9
9
|
import { u as usageResult } from "./errors-Vpu6rKHl.js";
|
|
10
10
|
import { c as requirePolicy } from "./load-DjSU5KXO.js";
|
|
11
11
|
import { s as quoteSqlLiteral, t as SQL_IDENT } from "./sql-0WjxIp9g.js";
|
|
@@ -15,11 +15,11 @@ import { t as applyFiles } from "./files-B3AA05f1.js";
|
|
|
15
15
|
import { i as fileDrift } from "./output-files-BIQ_9pIs.js";
|
|
16
16
|
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-A1_sp_tR.js";
|
|
17
17
|
import { O as quoteIdent, a as customRolesOn, t as CUSTOM_ROLES } from "./shared-Afctg7B0.js";
|
|
18
|
-
import { r as tableNames } from "./tables-
|
|
19
|
-
import { d as andConditions, l as collectGrants, o as assignableRoles, p as contextRefs, t as ownershipRules, u as roleNames } from "./ownership-
|
|
18
|
+
import { r as tableNames } from "./tables-BqrxBCir.js";
|
|
19
|
+
import { d as andConditions, l as collectGrants, o as assignableRoles, p as contextRefs, t as ownershipRules, u as roleNames } from "./ownership-DA5YdYTm.js";
|
|
20
20
|
import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
|
|
21
21
|
import { n as pgConnector } from "./pg-DQTqRrou.js";
|
|
22
|
-
import { m as tableFor, t as canFixture } from "./verify-
|
|
22
|
+
import { m as tableFor, t as canFixture } from "./verify-DlUcTDBz.js";
|
|
23
23
|
import { resolve } from "node:path";
|
|
24
24
|
//#region src/cli/powersync/names.ts
|
|
25
25
|
function ident(name) {
|
package/dist/prisma/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as WhereResult } from "../permdock-
|
|
1
|
+
import { Wt as Instant, br as Condition, hr as Subject } from "../policy-types-DGIO_gxq.js";
|
|
2
|
+
import { f as WhereResult } from "../permdock-CprAPN3w.js";
|
|
3
3
|
import { r as RelationsMapping } from "../graph-sql-BwFC4Qjs.js";
|
|
4
4
|
import { n as RowCheck, t as WithSubjectOptions } from "../subject-settings-vNW8qmUH.js";
|
|
5
5
|
//#region src/prisma/model-fields.d.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Un as Decision, fr as Membership, j as PolicyVocabulary } from "./policy-types-DGIO_gxq.js";
|
|
2
2
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
3
|
import { r as Role } from "./vocabulary-DEJ5j4mR.js";
|
|
4
|
-
import { d as UncheckedData, s as RowData } from "./permdock-
|
|
5
|
-
import { r as DescribeOptions, t as DecisionDescription } from "./describe-
|
|
6
|
-
import { n as ProtectedAction } from "./action-result-
|
|
7
|
-
import { a as FilterResult, c as PermissionSet, h as TenantView, l as PermissionState, m as SubjectView, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, u as ProtectedActionHandle } from "./types-
|
|
8
|
-
import { r as ProtectedProps } from "./types-
|
|
4
|
+
import { d as UncheckedData, s as RowData } from "./permdock-CprAPN3w.js";
|
|
5
|
+
import { r as DescribeOptions, t as DecisionDescription } from "./describe-BbFPBSms.js";
|
|
6
|
+
import { n as ProtectedAction } from "./action-result-BcudBQOF.js";
|
|
7
|
+
import { a as FilterResult, c as PermissionSet, h as TenantView, l as PermissionState, m as SubjectView, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, u as ProtectedActionHandle } from "./types-tQB2CEnY.js";
|
|
8
|
+
import { r as ProtectedProps } from "./types-rCRV4Ge-.js";
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
//#region src/react/hooks.d.ts
|
|
11
11
|
declare function usePermDock<V extends PolicyVocabulary = PolicyVocabulary>(): ClientPermDock<V>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PermDockProviderProps } from "./types-
|
|
1
|
+
import { n as PermDockProviderProps } from "./types-rCRV4Ge-.js";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
//#region src/react/provider.d.ts
|
|
4
4
|
declare function PermDockProvider(props: PermDockProviderProps): ReactElement;
|
|
@@ -7,7 +7,7 @@ import { o as formatCatalogJson } from "./catalog-doc-DjMKzJp9.js";
|
|
|
7
7
|
import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
|
|
8
8
|
import { n as parseSupabaseManifest } from "./manifest-wg8WkkpD.js";
|
|
9
9
|
import { t as parseCatalog } from "./parse-1_ZheTW5.js";
|
|
10
|
-
import { a as nonEmptyOr } from "./output-
|
|
10
|
+
import { a as nonEmptyOr } from "./output-DV5dwOTs.js";
|
|
11
11
|
import { t as POLICY_NOT_PUBLISHED } from "./problem-types-DSsRfONQ.js";
|
|
12
12
|
import { n as httpRequest, t as authFailure } from "./http-DOL33cO0.js";
|
|
13
13
|
import { l as cloudUrl, n as cliRuntime, o as readAuth } from "./auth--yPyZNgr.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as runCloudPull } from "./pull-2nJr0qg_.js";
|
|
@@ -6,8 +6,8 @@ import { s as cliVersion } from "./version-DMQ0dnN5.js";
|
|
|
6
6
|
import { i as loadConfiguredPolicy } from "./load-DjSU5KXO.js";
|
|
7
7
|
import { n as parseSupabaseManifest } from "./manifest-wg8WkkpD.js";
|
|
8
8
|
import { t as parseCatalog } from "./parse-1_ZheTW5.js";
|
|
9
|
-
import { r as pushedPolicy } from "./pushed-policy-
|
|
10
|
-
import { n as runCatalog } from "./catalog-
|
|
9
|
+
import { r as pushedPolicy } from "./pushed-policy-CDuOL2de.js";
|
|
10
|
+
import { n as runCatalog } from "./catalog-CGlSwU6j.js";
|
|
11
11
|
import { n as httpRequest, t as authFailure } from "./http-DOL33cO0.js";
|
|
12
12
|
import { a as pushAuth, l as cloudUrl, n as cliRuntime, u as firstNonEmpty } from "./auth--yPyZNgr.js";
|
|
13
13
|
import "./manifest-json-CAGzls-C.js";
|
|
@@ -3,7 +3,7 @@ import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
|
3
3
|
import { n as PermDockValidationError } from "./validation-error-CYg2kJEw.js";
|
|
4
4
|
import { n as RFC3339_PATTERN } from "./time-nR1JesoH.js";
|
|
5
5
|
import { i as wireValidity } from "./validity-Buc7w8E9.js";
|
|
6
|
-
import { n as snapshotScopes } from "./instance-snapshot
|
|
6
|
+
import { n as snapshotScopes } from "./instance-snapshot-DuWf1cT3.js";
|
|
7
7
|
import { n as copyJson, r as forbiddenKeyPath, t as checkSchema } from "./json-schema-BPGa-RjQ.js";
|
|
8
8
|
//#region src/catalog/pushed-policy.ts
|
|
9
9
|
const strings = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as Grantee, H as WireValidity, T as Policy, Vn as AppObligation, _ as GrantLimit, a as ApprovalRequirement, br as Condition, tn as SnapshotScope, u as BreakGlassSpec, v as GrantMeta } from "./policy-types-DGIO_gxq.js";
|
|
2
2
|
import { t as JsonSchemaNode } from "./json-schema-BfXgnRNT.js";
|
|
3
3
|
//#region src/catalog/pushed-policy.d.ts
|
|
4
4
|
/**
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as requiredPlans } from "../errors-
|
|
2
|
-
import { i as describe } from "../describe-
|
|
3
|
-
import { n as ProtectedAction, t as ActionResult } from "../action-result-
|
|
1
|
+
import { c as requiredPlans } from "../errors-BIM4MFsJ.js";
|
|
2
|
+
import { i as describe } from "../describe-BbFPBSms.js";
|
|
3
|
+
import { n as ProtectedAction, t as ActionResult } from "../action-result-BcudBQOF.js";
|
|
4
4
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
5
|
-
import { a as FilterResult, b as eventSourceRefresh, c as PermissionSet, d as ProtectedActionView, h as TenantView, i as ClientStatus, l as PermissionState, m as SubjectView, n as ApprovalState, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, u as ProtectedActionHandle, v as EventSourceRefreshOptions, y as RefreshTrigger } from "../types-
|
|
6
|
-
import { n as PermDockProviderProps, r as ProtectedProps, t as PermDockDefaults } from "../types-
|
|
7
|
-
import { a as useAssignableRoles, c as useGate, d as usePermission, f as usePermissions, h as useTenant, i as useAssignablePermissions, l as useMemberships, m as useSubject, n as Protected, o as useDescribe, p as useRoles, r as useApproval, s as useFilter, t as useProtectedAction, u as usePermDock } from "../protected-action-
|
|
8
|
-
import { t as PermDockProvider } from "../provider-
|
|
5
|
+
import { a as FilterResult, b as eventSourceRefresh, c as PermissionSet, d as ProtectedActionView, h as TenantView, i as ClientStatus, l as PermissionState, m as SubjectView, n as ApprovalState, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, u as ProtectedActionHandle, v as EventSourceRefreshOptions, y as RefreshTrigger } from "../types-tQB2CEnY.js";
|
|
6
|
+
import { n as PermDockProviderProps, r as ProtectedProps, t as PermDockDefaults } from "../types-rCRV4Ge-.js";
|
|
7
|
+
import { a as useAssignableRoles, c as useGate, d as usePermission, f as usePermissions, h as useTenant, i as useAssignablePermissions, l as useMemberships, m as useSubject, n as Protected, o as useDescribe, p as useRoles, r as useApproval, s as useFilter, t as useProtectedAction, u as usePermDock } from "../protected-action-D8x73IGm.js";
|
|
8
|
+
import { t as PermDockProvider } from "../provider-DfLeek9O.js";
|
|
9
9
|
export { type ActionResult, type ApprovalHandle, type ApprovalState, type ClientPermDock, type ClientStatus, type EventSourceRefreshOptions, type FilterResult, type GateMode, type GateView, type PermDockDefaults, PermDockProvider, type PermDockProviderProps, type PermissionSet, type PermissionState, Protected, type ProtectedAction, type ProtectedActionHandle, type ProtectedActionView, type ProtectedProps, type RefreshTrigger, type RolesOptions, type SubjectView, type TenantView, approvalHeaders, describe, eventSourceRefresh, requiredPlans, useApproval, useAssignablePermissions, useAssignableRoles, useDescribe, useFilter, useGate, useMemberships, usePermDock, usePermission, usePermissions, useProtectedAction, useRoles, useSubject, useTenant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PermDockProvider } from "../provider-
|
|
1
|
+
import { t as PermDockProvider } from "../provider-DfLeek9O.js";
|
|
2
2
|
export { PermDockProvider };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Jt as LocalRowValue, Kt as LocalMembershipRows, Wt as Instant, Xt as LocalSnapshotRows, Yt as LocalSnapshotManifest, Zt as Snapshot, ct as SnapshotSource, fr as Membership, qt as LocalRowColumn, sr as CustomRole } from "../policy-types-DGIO_gxq.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { c as requiredPlans } from "../errors-
|
|
4
|
-
import { i as describe } from "../describe-
|
|
5
|
-
import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-
|
|
6
|
-
import { n as ProtectedAction, t as ActionResult } from "../action-result-
|
|
3
|
+
import { c as requiredPlans } from "../errors-BIM4MFsJ.js";
|
|
4
|
+
import { i as describe } from "../describe-BbFPBSms.js";
|
|
5
|
+
import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-CCmbhnxP.js";
|
|
6
|
+
import { n as ProtectedAction, t as ActionResult } from "../action-result-BcudBQOF.js";
|
|
7
7
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
8
|
-
import { a as FilterResult, b as eventSourceRefresh, c as PermissionSet, d as ProtectedActionView, g as ClientStore, h as TenantView, i as ClientStatus, l as PermissionState, m as SubjectView, n as ApprovalState, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, u as ProtectedActionHandle, v as EventSourceRefreshOptions, y as RefreshTrigger } from "../types-
|
|
9
|
-
import { r as ProtectedProps, t as PermDockDefaults } from "../types-
|
|
10
|
-
import { a as useAssignableRoles, c as useGate, d as usePermission, f as usePermissions, h as useTenant, i as useAssignablePermissions, l as useMemberships, m as useSubject, n as Protected, o as useDescribe, p as useRoles, r as useApproval, s as useFilter, t as useProtectedAction, u as usePermDock } from "../protected-action-
|
|
11
|
-
import { a as SubscribeOnline, i as SubscribeForeground, n as ReactNativePermDockProviderProps, r as SnapshotStorage, t as NativeRevalidate } from "../types-
|
|
8
|
+
import { a as FilterResult, b as eventSourceRefresh, c as PermissionSet, d as ProtectedActionView, g as ClientStore, h as TenantView, i as ClientStatus, l as PermissionState, m as SubjectView, n as ApprovalState, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, u as ProtectedActionHandle, v as EventSourceRefreshOptions, y as RefreshTrigger } from "../types-tQB2CEnY.js";
|
|
9
|
+
import { r as ProtectedProps, t as PermDockDefaults } from "../types-rCRV4Ge-.js";
|
|
10
|
+
import { a as useAssignableRoles, c as useGate, d as usePermission, f as usePermissions, h as useTenant, i as useAssignablePermissions, l as useMemberships, m as useSubject, n as Protected, o as useDescribe, p as useRoles, r as useApproval, s as useFilter, t as useProtectedAction, u as usePermDock } from "../protected-action-D8x73IGm.js";
|
|
11
|
+
import { a as SubscribeOnline, i as SubscribeForeground, n as ReactNativePermDockProviderProps, r as SnapshotStorage, t as NativeRevalidate } from "../types-CWBsAwqn.js";
|
|
12
12
|
import { ReactElement } from "react";
|
|
13
13
|
//#region src/react-native/guards.d.ts
|
|
14
14
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as assertAppData } from "./app-data-UNNm07jV.js";
|
|
2
2
|
import { n as wrapPermDock } from "./wrap-B2wziJI_.js";
|
|
3
|
-
import { t as buildInstance } from "./build-instance-
|
|
3
|
+
import { t as buildInstance } from "./build-instance-BWXqwQYU.js";
|
|
4
4
|
//#region src/core/request-context.ts
|
|
5
5
|
/**
|
|
6
6
|
* Errors an adapter raises around one instance (a `context` hook that threw, an
|
package/dist/resend/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ApprovalUrl, t as ApprovalPrompt } from "../approval-prompt-
|
|
3
|
-
import { d as EmailTransport, o as DeliveryResult, u as EmailMessage } from "../types-
|
|
4
|
-
import { l as ReplayStore } from "../types-
|
|
1
|
+
import { J as DecisionSink } from "../policy-types-DGIO_gxq.js";
|
|
2
|
+
import { n as ApprovalUrl, t as ApprovalPrompt } from "../approval-prompt-3BqWczTt.js";
|
|
3
|
+
import { d as EmailTransport, o as DeliveryResult, u as EmailMessage } from "../types-CN0LsqbK.js";
|
|
4
|
+
import { l as ReplayStore } from "../types-DsHGPtkR.js";
|
|
5
5
|
//#region src/resend/approval-email.d.ts
|
|
6
6
|
type ApprovalEmailOptions = {
|
|
7
7
|
/**
|
|
@@ -5,7 +5,7 @@ import { i as configError } from "./errors-Vpu6rKHl.js";
|
|
|
5
5
|
import "./budget-BELja5A9.js";
|
|
6
6
|
import "./sources-CMAM-2A3.js";
|
|
7
7
|
import { A as quoteQualified, D as qualified, I as scopeTypeOf, O as quoteIdent } from "./shared-Afctg7B0.js";
|
|
8
|
-
import { F as globalRoleRows, Q as graphSqlName, Z as graphHelper, _ as PERMISSION_HELPERS, at as memberForHelper, c as holderSources, ct as memberIdsHelper, dt as permittedForHelper, ft as permittedIdsHelper, ht as scopeTable, lt as memberOfHelper, nt as inheritedRowsHelper, o as graphPlan, pt as restrictedHelper, r as tableNames, rt as isTeamScope, tt as hasPermittedUsers, v as checkName, x as permittedByPermissionHelper } from "./tables-
|
|
8
|
+
import { F as globalRoleRows, Q as graphSqlName, Z as graphHelper, _ as PERMISSION_HELPERS, at as memberForHelper, c as holderSources, ct as memberIdsHelper, dt as permittedForHelper, ft as permittedIdsHelper, ht as scopeTable, lt as memberOfHelper, nt as inheritedRowsHelper, o as graphPlan, pt as restrictedHelper, r as tableNames, rt as isTeamScope, tt as hasPermittedUsers, v as checkName, x as permittedByPermissionHelper } from "./tables-BqrxBCir.js";
|
|
9
9
|
import { t as FIELD_VIEWS } from "./fields-D0vUI6dq.js";
|
|
10
10
|
//#region src/cli/rls/permission-holders.ts
|
|
11
11
|
/**
|
|
@@ -192,7 +192,7 @@ async function rlsInput(ctx, verb, shape, options) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
async function runRls(input) {
|
|
195
|
-
return (await import("./rls-
|
|
195
|
+
return (await import("./rls-Cx0dtsB7.js")).runRls(input);
|
|
196
196
|
}
|
|
197
197
|
const generate = defineLeaf({
|
|
198
198
|
flags: {
|