permdock 0.8.0 → 0.10.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/active-tenant-DVee32-T.js +39 -0
- package/dist/{adoption-scan-BLs67P1l.js → adoption-scan-0oFt2RD5.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-DA9PCXew.js} +1 -1
- package/dist/{arazzo-B5-ulWif.js → arazzo-DhxDfYt-.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 +192 -27
- package/dist/better-supabase/index.js +248 -64
- 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-H0rKxBx2.js → casbin-BJu2liqU.js} +1 -1
- package/dist/{casbin-cbSbhT_k.js → casbin-BkhqGh2z.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 +9 -4
- package/dist/cli/index.js +11 -3
- package/dist/cloud/index.d.ts +8 -8
- package/dist/{cloud-BFlGMaak.js → cloud-3RIuS4E9.js} +2 -2
- package/dist/{codemod-DLQ9Zpo4.js → codemod-DLcp-B6v.js} +2 -2
- package/dist/{codemod-DWSN2erG.js → codemod-DRl_w-bY.js} +1 -1
- package/dist/collect-D-eroIfV.js +1 -0
- package/dist/{collect-Bzv3le0A.js → collect-D9Tt0Bcx.js} +2 -2
- 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-VSWvaaPO.js} +1 -1
- package/dist/{config-BwPBfN0t.js → config-BR23fL8m.js} +2 -2
- package/dist/{config-DBeXXmBF.js → config-kL36AxkE.js} +1 -1
- package/dist/{config-report-BipSWA6V.js → config-report-osnfUNg5.js} +3 -3
- package/dist/{config-shape-ykV0Vm2n.js → config-shape-tsxHx71E.js} +2 -1
- 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-CDd9c22W.d.ts} +15 -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-D3wo-yuz.js → doctor-B9FY9H0F.js} +2 -2
- package/dist/{doctor-CHD1M9R5.js → doctor-DfTnMaUt.js} +144 -16
- 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/{fields-D0vUI6dq.js → fields-DI8s3cPl.js} +1 -1
- package/dist/{gen-DWCYcMQM.js → gen-DuAhghDw.js} +2 -2
- package/dist/{gen-B5kvbAoZ.js → gen-DwgCSC6V.js} +1 -1
- 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-CST57XLp.js → import-CNBF96hB.js} +2 -2
- package/dist/{import-_YqhhwvX.js → import-Iuk9mx8A.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-BW_0MZOS.d.ts → index-Cay5-Kvx.d.ts} +13 -8
- 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-Bv5iXPqU.d.ts → index-ymept53A.d.ts} +4 -4
- package/dist/index.d.ts +16 -15
- package/dist/index.js +6 -6
- package/dist/{init-cE3A8aXq.js → init-DeoSvkh2.js} +1 -1
- package/dist/{init-Dz_PsHdv.js → init-fNF_XmTa.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-DplQ0s84.js → login-CutVtcmQ.js} +1 -1
- package/dist/{login-D-8tMqzo.js → login-DYazeWc9.js} +3 -3
- package/dist/{manifest-Cgiq5oqc.js → manifest-B4ENCp2I.js} +35 -35
- package/dist/{manifest-CzzWtnAb.d.ts → manifest-B5yF3CIq.d.ts} +19 -0
- package/dist/{manifest-wg8WkkpD.js → manifest-BXTbHNIV.js} +1 -1
- package/dist/{manifest-schema-2r37XRhD.js → manifest-schema-DQkBK2Mr.js} +28 -1
- 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/{migrate-B7oP_sQU.js → migrate-BJHxQqT5.js} +2 -2
- package/dist/{module-values-BJTBdo6y.js → module-values-B1EVTkHP.js} +1 -1
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +32 -12
- package/dist/next/index.js +15 -8
- 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-C-ADypaY.js} +1 -1
- package/dist/{openapi-CBZUhA3l.js → openapi-DFj0cirS.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-LsbLe41I.js} +1 -1
- package/dist/{ownership-B4L59T9u.js → ownership-qqBuGJXr.js} +11 -6
- 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-DicQyqm-.d.ts → postgrest-D5nUGm-c.d.ts} +4 -3
- package/dist/{postgrest-D4nuPXIQ.js → postgrest-DAxFltvO.js} +35 -56
- package/dist/{powersync-DXqGuq9A.js → powersync-B_8uwz7f.js} +2 -2
- package/dist/powersync-CSzDCHRu.js +1 -0
- package/dist/{powersync-DHNQX06W.js → powersync-DUT-UKgw.js} +190 -38
- 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-DQCgvJSC.js} +2 -2
- package/dist/pull-DYbyod1f.js +1 -0
- package/dist/{push-DgssgzkK.js → push-Dq_ca4-j.js} +3 -3
- 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-Y1Cb22cp.js} +4 -4
- package/dist/{rls-CNEH2_BG.js → rls-B57mIeVq.js} +34 -20
- package/dist/{rls-Ca8Jz9b5.js → rls-j0YrFPpW.js} +1 -1
- package/dist/{rpc-fNqAIqQk.js → rpc-vHIwyXCp.js} +1 -1
- package/dist/run-BATawNVH.js +1 -0
- package/dist/{run-Bz26OTfO.js → run-CLP_fQUF.js} +3 -3
- package/dist/{run-ticket-Dv7aF7Dk.js → run-ticket-DfnZCh-u.js} +19 -6
- package/dist/{run-ticket-DbWI9f99.d.ts → run-ticket-ylovhyFQ.d.ts} +18 -3
- package/dist/{saas-iWnUdwCt.js → saas-DK4V-3Is.js} +2 -2
- package/dist/{scan-DCj1KQfn.js → scan-B7xrAvRm.js} +1 -1
- package/dist/{schema-Dst9I9Gs.js → schema-3PJ8wAeL.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +2 -2
- package/dist/{server-types-CIlpSA2G.d.ts → server-types-CyRN0-Cd.d.ts} +15 -8
- package/dist/{shared-Afctg7B0.js → shared-DrGLwM3s.js} +1 -1
- package/dist/{sink-Dvi7YZG_.d.ts → sink-B5zoUW_O.d.ts} +2 -2
- package/dist/{skills-OuoMR49L.js → skills-BUI8DMqy.js} +1 -1
- package/dist/{skills-Bjj7BNEQ.js → skills-iwbRxavw.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-CMAM-2A3.js → sources-C4vkzZJV.js} +12 -7
- package/dist/{types-ah9NlU6j.d.ts → sources-oB1Hg1Fm.d.ts} +316 -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 -6
- package/dist/supabase/index.js +4 -4
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +4 -4
- package/dist/{supabase-BL1qJzzY.js → supabase-B1EfuD47.js} +2 -2
- package/dist/{supabase-D39cuGPt.js → supabase-BaizG0n7.js} +2 -2
- package/dist/{supabase-hook-B-yXnzUl.js → supabase-hook-BT2P9wah.js} +110 -47
- package/dist/supabase-hook-CbvGAutK.js +1 -0
- package/dist/{supautils-BU-pAEpf.js → supautils-DBKOoyjn.js} +247 -200
- 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-DimBcVWY.js} +3 -3
- 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/fixtures/index.d.ts +1 -1
- package/dist/testing/fixtures/index.js +26 -28
- package/dist/testing/index.d.ts +23 -21
- package/dist/testing/index.js +64 -10
- 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-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-Cklw5hJo.d.ts} +26 -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-ab0PdusX.js → usage-B1ZJOUdr.js} +1 -1
- package/dist/{usage-CxEzS4ey.js → usage-t_nXnwCW.js} +3 -3
- package/dist/usage-weohzv2f.js +1 -0
- package/dist/{validation-error-YGg2mXyH.d.ts → validation-error-uvp-kyfO.d.ts} +1 -1
- package/dist/{verify-DZeqoWu5.js → verify-jHrbmn-E.js} +9 -9
- package/dist/version-cache-Df11C2Qp.d.ts +51 -0
- 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-Bpci3hBY.js} +2 -2
- package/dist/watch-COuvly20.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 +23 -7
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-DlJE3gS_.d.ts → wrap-DxXB54Wu.d.ts} +2 -2
- package/package.json +3 -3
- package/schemas/run-v1.json +16 -0
- package/schemas/supabase-manifest-v1.json +28 -0
- package/skills/permdock-agents/references/operations-automations-chat.md +1 -0
- package/skills/permdock-data/references/queries-and-rls.md +1 -1
- package/skills/permdock-wire/references/adapters.md +4 -3
- 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/sources-B1Os_YUu.d.ts +0 -312
- package/dist/supabase-hook-H-MtE9Wd.js +0 -1
- package/dist/usage-CYeXek0p.js +0 -1
- package/dist/watch-DB42U1ib.js +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
-
import { c as isConditionDate, l as isConditionRef } from "./refs-C8BKxc_e.js";
|
|
3
|
-
import {
|
|
2
|
+
import { c as isConditionDate, l as isConditionRef, o as hasConditionOp } from "./refs-C8BKxc_e.js";
|
|
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";
|
|
12
12
|
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-EzEMB-7v.js";
|
|
13
|
-
import "./sources-
|
|
13
|
+
import "./sources-C4vkzZJV.js";
|
|
14
14
|
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
|
-
import { O as quoteIdent, a as customRolesOn, t as CUSTOM_ROLES } from "./shared-
|
|
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-
|
|
17
|
+
import { O as quoteIdent, a as customRolesOn, t as CUSTOM_ROLES } from "./shared-DrGLwM3s.js";
|
|
18
|
+
import { r as tableNames } from "./tables-DimBcVWY.js";
|
|
19
|
+
import { d as andConditions, l as collectGrants, o as assignableRoles, p as contextRefs, t as ownershipRules, u as roleNames } from "./ownership-qqBuGJXr.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-jHrbmn-E.js";
|
|
23
23
|
import { resolve } from "node:path";
|
|
24
24
|
//#region src/cli/powersync/names.ts
|
|
25
25
|
function ident(name) {
|
|
@@ -87,7 +87,7 @@ function scopeSourcesOf(sources, name) {
|
|
|
87
87
|
/** The source's stream form, or why its rows cannot filter a stream. */
|
|
88
88
|
function streamOf(source) {
|
|
89
89
|
const { stream } = source.sql;
|
|
90
|
-
if (stream === void 0) return `the ${source.sql.table} membership source has no stream form: build it with tableMembershipSource or
|
|
90
|
+
if (stream === void 0) return `the ${source.sql.table} membership source has no stream form: build it with tableMembershipSource, junctionMembershipSource or blockMembershipSource`;
|
|
91
91
|
if (stream.expiresAt !== void 0) return `the ${stream.table} membership source has no stream: it has an expiry`;
|
|
92
92
|
if (stream.disabledAt !== void 0) return `the ${stream.table} membership source has no stream: it has disabledAt`;
|
|
93
93
|
return stream;
|
|
@@ -399,6 +399,65 @@ function customRoleItems(ctx, grants, resource, key, table) {
|
|
|
399
399
|
}) };
|
|
400
400
|
}
|
|
401
401
|
//#endregion
|
|
402
|
+
//#region src/cli/powersync/tables.ts
|
|
403
|
+
/**
|
|
404
|
+
* One stream per `powersync.tables` entry: the user's own rows, and the rows
|
|
405
|
+
* that point at a resource row the user reads. A stream of the user's own rows
|
|
406
|
+
* alone carries `user`, so `verify` checks it holds no other user's row.
|
|
407
|
+
*/
|
|
408
|
+
function tableStreams(tables, dialect, taken, permitted) {
|
|
409
|
+
const streams = [];
|
|
410
|
+
const warnings = [];
|
|
411
|
+
const omitted = [];
|
|
412
|
+
for (const [source, spec] of Object.entries(tables)) {
|
|
413
|
+
const table = bare(source, dialect);
|
|
414
|
+
const from = fromTable(source, dialect);
|
|
415
|
+
const queries = [];
|
|
416
|
+
const follows = spec.follow ?? [];
|
|
417
|
+
const invalid = [...spec.user === void 0 ? [] : [spec.user], ...follows.flatMap((follow) => [follow.field, ...Object.keys(follow.match ?? {})])].find((column) => !SQL_IDENT.test(column));
|
|
418
|
+
if (taken.has(table) || invalid !== void 0) {
|
|
419
|
+
omitted.push({
|
|
420
|
+
resource: source,
|
|
421
|
+
reason: invalid === void 0 ? `a resource stream is named ${table}` : `${invalid} is not a column name`
|
|
422
|
+
});
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
if (spec.user !== void 0) queries.push(`SELECT * FROM ${from} WHERE ${dialect.column(table, spec.user)} = ${dialect.user}`);
|
|
426
|
+
for (const follow of follows) {
|
|
427
|
+
const { ids, gaps } = permitted(follow.resource);
|
|
428
|
+
for (const gap of gaps) warnings.push(`${source} under-syncs: ${gap}`);
|
|
429
|
+
if (ids === void 0) {
|
|
430
|
+
warnings.push(`${source} does not sync the rows of ${follow.resource}: no grant of its read permission compiles, or it has a deny grant`);
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
const match = Object.entries(follow.match ?? {}).map(([column, value]) => `${dialect.column(table, column)} = ${dialect.literal(value)}`);
|
|
434
|
+
for (const query of ids) queries.push(`SELECT * FROM ${from} WHERE ${[`${dialect.column(table, follow.field)} IN (${query})`, ...match].join(" AND ")}`);
|
|
435
|
+
}
|
|
436
|
+
if (queries.length === 0) {
|
|
437
|
+
omitted.push({
|
|
438
|
+
resource: source,
|
|
439
|
+
reason: "no query compiles"
|
|
440
|
+
});
|
|
441
|
+
continue;
|
|
442
|
+
}
|
|
443
|
+
streams.push(spec.user !== void 0 && follows.length === 0 ? {
|
|
444
|
+
name: table,
|
|
445
|
+
table,
|
|
446
|
+
user: spec.user,
|
|
447
|
+
queries
|
|
448
|
+
} : {
|
|
449
|
+
name: table,
|
|
450
|
+
table,
|
|
451
|
+
queries
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
return {
|
|
455
|
+
streams,
|
|
456
|
+
warnings,
|
|
457
|
+
omitted
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
402
461
|
//#region src/cli/powersync/streams.ts
|
|
403
462
|
const POWERSYNC = {
|
|
404
463
|
user: "auth.user_id()",
|
|
@@ -419,6 +478,8 @@ const POSTGRES = {
|
|
|
419
478
|
* than truncated.
|
|
420
479
|
*/
|
|
421
480
|
const MAX_QUERIES = 32;
|
|
481
|
+
/** Nested `inherit()` grants a stream follows; a longer chain syncs nothing. */
|
|
482
|
+
const MAX_INHERIT_DEPTH = 4;
|
|
422
483
|
/** Every combination of one clause list from each input, ANDed. */
|
|
423
484
|
function product(lists) {
|
|
424
485
|
let out = [[]];
|
|
@@ -502,15 +563,85 @@ function conditionSql(condition, table, ctx) {
|
|
|
502
563
|
return membershipSql(scope, left, condition.roles, ctx);
|
|
503
564
|
}
|
|
504
565
|
case "sqlFunction": return conditionSql(condition.twin, table, ctx);
|
|
566
|
+
case "related": return relatedSql(condition, table, ctx);
|
|
505
567
|
case "not":
|
|
506
568
|
case "contains":
|
|
507
|
-
case "related":
|
|
508
569
|
case "opaque":
|
|
509
570
|
case "liveSession": return;
|
|
510
571
|
default: return condition;
|
|
511
572
|
}
|
|
512
573
|
}
|
|
513
574
|
/**
|
|
575
|
+
* An `inherit()` condition: the row's `field` among the ids of the `resource`
|
|
576
|
+
* rows the user reaches with `permission`, one nested `IN (SELECT …)` per link
|
|
577
|
+
* hop. A relation reads the closure table, which Sync Streams cannot.
|
|
578
|
+
*/
|
|
579
|
+
function relatedSql(condition, table, ctx) {
|
|
580
|
+
const { permission } = condition;
|
|
581
|
+
if (permission === void 0 || condition.relation !== "" || condition.ids !== void 0 || condition.depth > 0 || condition.restrictedAncestors !== void 0 || ctx.depth >= MAX_INHERIT_DEPTH || !SQL_IDENT.test(condition.field)) return;
|
|
582
|
+
let ids = permittedSql(condition.resource, permission, {
|
|
583
|
+
...ctx,
|
|
584
|
+
depth: ctx.depth + 1
|
|
585
|
+
});
|
|
586
|
+
const hops = condition.hops ?? [];
|
|
587
|
+
for (let index = hops.length - 1; index > 0 && ids !== void 0; index -= 1) {
|
|
588
|
+
const hop = hops[index];
|
|
589
|
+
const node = ctx.policy.resources.get(hops[index - 1]?.resource ?? "");
|
|
590
|
+
const link = hop !== void 0 && node !== void 0 && Object.hasOwn(node.links, hop.link) ? node.links[hop.link] : void 0;
|
|
591
|
+
if (node === void 0 || link === void 0 || !SQL_IDENT.test(node.id) || !SQL_IDENT.test(link.field)) return;
|
|
592
|
+
const source = tableFor(node.name, tableNames(ctx.config.rls?.tables));
|
|
593
|
+
const name = bare(source, ctx.dialect);
|
|
594
|
+
ids = ids.map((query) => `SELECT ${ctx.dialect.column(name, node.id)} FROM ${fromTable(source, ctx.dialect)} WHERE ${ctx.dialect.column(name, link.field)} IN (${query})`);
|
|
595
|
+
}
|
|
596
|
+
const open = condition.restricted === void 0 ? [[]] : conditionSql({
|
|
597
|
+
op: "or",
|
|
598
|
+
conditions: [{
|
|
599
|
+
op: "isNull",
|
|
600
|
+
field: condition.restricted,
|
|
601
|
+
value: true
|
|
602
|
+
}, {
|
|
603
|
+
op: "eq",
|
|
604
|
+
field: condition.restricted,
|
|
605
|
+
value: false
|
|
606
|
+
}]
|
|
607
|
+
}, table, ctx);
|
|
608
|
+
if (ids === void 0 || open === void 0) return;
|
|
609
|
+
const left = ctx.dialect.column(table, condition.field);
|
|
610
|
+
return product([ids.map((query) => [`${left} IN (${query})`]), open]);
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* The `SELECT`s of the ids of the `resource` rows the user reaches with `key`:
|
|
614
|
+
* `[]` when no grant gives it, `undefined` when a deny grant could subtract
|
|
615
|
+
* rows or no grant compiles. A grant that does not compile leaves its rows out,
|
|
616
|
+
* which the caller reports as an under-sync.
|
|
617
|
+
*/
|
|
618
|
+
function permittedSql(resource, key, ctx) {
|
|
619
|
+
const node = ctx.policy.resources.get(resource);
|
|
620
|
+
const items = ctx.grants.filter((item) => item.grant.permission.key === key);
|
|
621
|
+
if (node === void 0 || !SQL_IDENT.test(node.id) || items.some((item) => item.grant.effect === "deny")) return;
|
|
622
|
+
const source = tableFor(resource, tableNames(ctx.config.rls?.tables));
|
|
623
|
+
const table = bare(source, ctx.dialect);
|
|
624
|
+
const custom = customRoleItems(ctx, ctx.grants, resource, key, table);
|
|
625
|
+
if (custom.skipped !== void 0) ctx.gaps.push(custom.skipped);
|
|
626
|
+
const reaches = [...items.map((item) => ({
|
|
627
|
+
item,
|
|
628
|
+
access: unsupported(item) ?? accessSql(item, table, ctx)
|
|
629
|
+
})), ...custom.items.map((entry) => ({
|
|
630
|
+
item: entry.item,
|
|
631
|
+
access: entry.access
|
|
632
|
+
}))];
|
|
633
|
+
const queries = /* @__PURE__ */ new Set();
|
|
634
|
+
for (const { item, access } of reaches) {
|
|
635
|
+
const where = typeof access === "string" || item.where === void 0 ? [[]] : conditionSql(item.where, table, ctx);
|
|
636
|
+
if (typeof access === "string" || where === void 0) {
|
|
637
|
+
ctx.gaps.push(`inherit() of ${key} leaves out ${item.label}: ${typeof access === "string" ? access : "its condition has no Sync Streams form"}`);
|
|
638
|
+
continue;
|
|
639
|
+
}
|
|
640
|
+
for (const clauses of product([access, where])) queries.add(`SELECT ${ctx.dialect.column(table, node.id)} FROM ${fromTable(source, ctx.dialect)}${clauses.length === 0 ? "" : ` WHERE ${clauses.join(" AND ")}`}`);
|
|
641
|
+
}
|
|
642
|
+
return queries.size === 0 && reaches.length > 0 ? void 0 : [...queries];
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
514
645
|
* One `IN (SELECT …)` per role source of the membership table: the row's `left`
|
|
515
646
|
* is an instance the user holds `roles` in.
|
|
516
647
|
*/
|
|
@@ -758,6 +889,7 @@ function powersyncPlan(policy, config, dialect = POWERSYNC) {
|
|
|
758
889
|
}
|
|
759
890
|
function planWith(policy, config, dialect) {
|
|
760
891
|
const scopes = scopeList(policy.scopes);
|
|
892
|
+
const grants = collectGrants(policy);
|
|
761
893
|
const ctx = {
|
|
762
894
|
policy,
|
|
763
895
|
config,
|
|
@@ -765,10 +897,11 @@ function planWith(policy, config, dialect) {
|
|
|
765
897
|
kinds: ownershipRules(policy, scopes)?.kinds ?? {},
|
|
766
898
|
dialect,
|
|
767
899
|
sources: guardedSources(policy, config),
|
|
900
|
+
grants,
|
|
901
|
+
depth: 0,
|
|
768
902
|
gaps: []
|
|
769
903
|
};
|
|
770
904
|
const action = config.powersync?.action ?? "read";
|
|
771
|
-
const grants = collectGrants(policy);
|
|
772
905
|
const resources = config.powersync?.resources ?? [...policy.resources.keys()].filter((name) => grants.some((item) => item.grant.permission.resource === name && item.grant.permission.action === action));
|
|
773
906
|
const streams = [];
|
|
774
907
|
const omitted = [];
|
|
@@ -849,11 +982,22 @@ function planWith(policy, config, dialect) {
|
|
|
849
982
|
queries: [...queries]
|
|
850
983
|
});
|
|
851
984
|
}
|
|
985
|
+
const tables = tableStreams(config.powersync?.tables ?? {}, dialect, new Set(streams.map((stream) => stream.name)), (resource) => ({
|
|
986
|
+
ids: permittedSql(resource, `${resource}.${action}`, ctx),
|
|
987
|
+
gaps: [...new Set(ctx.gaps.splice(0))]
|
|
988
|
+
}));
|
|
989
|
+
warnings.push(...tables.warnings);
|
|
990
|
+
omitted.push(...tables.omitted);
|
|
852
991
|
const subject = subjectStreams(ctx);
|
|
853
|
-
const outside = [...new Set([
|
|
992
|
+
const outside = [...new Set([
|
|
993
|
+
...streams,
|
|
994
|
+
...subject,
|
|
995
|
+
...tables.streams
|
|
996
|
+
].flatMap((stream) => stream.queries.flatMap((query) => [...query.matchAll(QUOTED_TABLE)].map(([, schema, name]) => `${schema ?? ""}.${name ?? ""}`))))].toSorted();
|
|
854
997
|
return {
|
|
855
998
|
streams,
|
|
856
999
|
subject,
|
|
1000
|
+
tables: tables.streams,
|
|
857
1001
|
omitted,
|
|
858
1002
|
warnings,
|
|
859
1003
|
unsynced,
|
|
@@ -862,31 +1006,6 @@ function planWith(policy, config, dialect) {
|
|
|
862
1006
|
...outside.length === 0 ? {} : { publication: `alter publication powersync add table ${outside.join(", ")};` }
|
|
863
1007
|
};
|
|
864
1008
|
}
|
|
865
|
-
/**
|
|
866
|
-
* A YAML scalar quoted as oxfmt and Prettier write it: single quotes around a
|
|
867
|
-
* `"`, unless a backslash needs a double-quoted escape.
|
|
868
|
-
*/
|
|
869
|
-
function yamlString(text) {
|
|
870
|
-
return text.includes("\"") && !text.includes("\\") ? `'${text.replaceAll("'", "''")}'` : JSON.stringify(text);
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* `sync-config.yaml`: edition 3 Sync Streams, one auto-subscribed stream per
|
|
874
|
-
* synced resource.
|
|
875
|
-
*/
|
|
876
|
-
function powersyncYaml(plan) {
|
|
877
|
-
const lines = [
|
|
878
|
-
"# Generated by permdock powersync generate from the policy. Do not edit.",
|
|
879
|
-
...plan.publication === void 0 ? [] : ["# Tables outside public must be in the powersync publication:", `# ${plan.publication}`],
|
|
880
|
-
"config:",
|
|
881
|
-
" edition: 3",
|
|
882
|
-
"",
|
|
883
|
-
"streams:"
|
|
884
|
-
];
|
|
885
|
-
if (plan.streams.length === 0 && plan.subject.length === 0) lines[lines.length - 1] = "streams: {}";
|
|
886
|
-
for (const stream of [...plan.streams, ...plan.subject]) lines.push(` ${stream.name}:`, " auto_subscribe: true", " queries:", ...stream.queries.map((query) => ` - ${yamlString(query)}`));
|
|
887
|
-
for (const item of plan.omitted) lines.push(`# ${item.resource}: not synced, ${item.reason}`);
|
|
888
|
-
return `${lines.join("\n")}\n`;
|
|
889
|
-
}
|
|
890
1009
|
//#endregion
|
|
891
1010
|
//#region src/cli/powersync/verify-gaps.ts
|
|
892
1011
|
function heldRoles(subject) {
|
|
@@ -911,6 +1030,37 @@ function warnedFor(unsynced, permission, subject, customRoles) {
|
|
|
911
1030
|
});
|
|
912
1031
|
}
|
|
913
1032
|
//#endregion
|
|
1033
|
+
//#region src/cli/powersync/yaml.ts
|
|
1034
|
+
/**
|
|
1035
|
+
* A YAML scalar quoted as oxfmt and Prettier write it: single quotes around a
|
|
1036
|
+
* `"`, unless a backslash needs a double-quoted escape.
|
|
1037
|
+
*/
|
|
1038
|
+
function yamlString(text) {
|
|
1039
|
+
return text.includes("\"") && !text.includes("\\") ? `'${text.replaceAll("'", "''")}'` : JSON.stringify(text);
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* `sync-config.yaml`: edition 3 Sync Streams, one auto-subscribed stream per
|
|
1043
|
+
* synced resource.
|
|
1044
|
+
*/
|
|
1045
|
+
function powersyncYaml(plan) {
|
|
1046
|
+
const lines = [
|
|
1047
|
+
"# Generated by permdock powersync generate from the policy. Do not edit.",
|
|
1048
|
+
...plan.publication === void 0 ? [] : ["# Tables outside public must be in the powersync publication:", `# ${plan.publication}`],
|
|
1049
|
+
"config:",
|
|
1050
|
+
" edition: 3",
|
|
1051
|
+
"",
|
|
1052
|
+
"streams:"
|
|
1053
|
+
];
|
|
1054
|
+
if (plan.streams.length === 0 && plan.subject.length === 0 && plan.tables.length === 0) lines[lines.length - 1] = "streams: {}";
|
|
1055
|
+
for (const stream of [
|
|
1056
|
+
...plan.streams,
|
|
1057
|
+
...plan.subject,
|
|
1058
|
+
...plan.tables
|
|
1059
|
+
]) lines.push(` ${stream.name}:`, " auto_subscribe: true", " queries:", ...stream.queries.map((query) => ` - ${yamlString(query)}`));
|
|
1060
|
+
for (const item of plan.omitted) lines.push(`# ${item.resource}: not synced, ${item.reason}`);
|
|
1061
|
+
return `${lines.join("\n")}\n`;
|
|
1062
|
+
}
|
|
1063
|
+
//#endregion
|
|
914
1064
|
//#region src/cli/powersync/powersync.ts
|
|
915
1065
|
const POWERSYNC_HELP = `permdock powersync generate [--out sync-config.yaml] [--check]
|
|
916
1066
|
permdock powersync verify [--db-url-stdin] [--fixtures rls.fixtures.json]`;
|
|
@@ -997,6 +1147,7 @@ async function synced(query, stream, fixture) {
|
|
|
997
1147
|
}
|
|
998
1148
|
async function verifyStreams(input) {
|
|
999
1149
|
const plan = powersyncPlan(input.policy, input.config, POSTGRES);
|
|
1150
|
+
const inherited = new Set(collectGrants(input.policy).filter((item) => hasConditionOp(item.where, "related")).map((item) => item.grant.permission.key));
|
|
1000
1151
|
const mismatches = [];
|
|
1001
1152
|
const notes = [];
|
|
1002
1153
|
const client = await input.connect(input.db);
|
|
@@ -1007,7 +1158,7 @@ async function verifyStreams(input) {
|
|
|
1007
1158
|
for (const fixture of input.fixtures) {
|
|
1008
1159
|
if (checked.has(fixture.subject.id)) continue;
|
|
1009
1160
|
checked.add(fixture.subject.id);
|
|
1010
|
-
for (const stream of plan.subject) if (stream.user !== void 0 && await leaks(query, stream, stream.user, fixture)) mismatches.push(`stream ${stream.name} syncs another user's ${stream.table} rows to ${fixture.subject.id}`);
|
|
1161
|
+
for (const stream of [...plan.subject, ...plan.tables]) if (stream.user !== void 0 && await leaks(query, stream, stream.user, fixture)) mismatches.push(`stream ${stream.name} syncs another user's ${stream.table} rows to ${fixture.subject.id}`);
|
|
1011
1162
|
}
|
|
1012
1163
|
for (const fixture of input.fixtures) {
|
|
1013
1164
|
const permission = findPermission(input.policy.permissions, fixture.action);
|
|
@@ -1021,6 +1172,7 @@ async function verifyStreams(input) {
|
|
|
1021
1172
|
const granted = canFixture(permdock, permission, fixtureRow(fixture, permission.kind));
|
|
1022
1173
|
const holds = await synced(query, stream, fixture);
|
|
1023
1174
|
if (holds === void 0) notes.push(`${fixture.action} for ${fixture.subject.id}: not checked against stream ${stream.name}: the fixture row has no ${stream.id}`);
|
|
1175
|
+
else if (holds && !granted && inherited.has(permission.key)) notes.push(`${fixture.action} for ${fixture.subject.id}: stream ${stream.name} syncs the row through inherit(), which verify does not check: can() here has no relation source`);
|
|
1024
1176
|
else if (holds && !granted) mismatches.push(`${fixture.action} for ${fixture.subject.id}: stream ${stream.name} syncs a row the policy denies`);
|
|
1025
1177
|
else if (granted && !holds && warnedFor(plan.unsynced, permission.key, fixture.subject, input.customRoles)) notes.push(`${fixture.action} for ${fixture.subject.id}: granted, not synced (the app reads it from the server)`);
|
|
1026
1178
|
else if (granted && !holds) mismatches.push(`${fixture.action} for ${fixture.subject.id}: granted, but stream ${stream.name} does not sync the row and generate gave no warning for it`);
|
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;
|
|
@@ -5,9 +5,9 @@ import { s as writeFileEnsuringDir } from "./files-BSjrtIHw.js";
|
|
|
5
5
|
import { s as cliVersion } from "./version-DMQ0dnN5.js";
|
|
6
6
|
import { o as formatCatalogJson } from "./catalog-doc-DjMKzJp9.js";
|
|
7
7
|
import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
|
|
8
|
-
import { n as parseSupabaseManifest } from "./manifest-
|
|
8
|
+
import { n as parseSupabaseManifest } from "./manifest-BXTbHNIV.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-LsbLe41I.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-DQCgvJSC.js";
|
|
@@ -4,10 +4,10 @@ import { t as catalogFingerprint } from "./catalog-fingerprint-e6aCWosn.js";
|
|
|
4
4
|
import { a as describeError, n as CliError } from "./errors-Vpu6rKHl.js";
|
|
5
5
|
import { s as cliVersion } from "./version-DMQ0dnN5.js";
|
|
6
6
|
import { i as loadConfiguredPolicy } from "./load-DjSU5KXO.js";
|
|
7
|
-
import { n as parseSupabaseManifest } from "./manifest-
|
|
7
|
+
import { n as parseSupabaseManifest } from "./manifest-BXTbHNIV.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
|
/**
|
|
@@ -3,10 +3,10 @@ import { c as listPermissions } from "./permission-registry-B8tYxPIt.js";
|
|
|
3
3
|
import { f as scopeList } from "./scopes-0Up_UA2t.js";
|
|
4
4
|
import { i as configError } from "./errors-Vpu6rKHl.js";
|
|
5
5
|
import "./budget-BELja5A9.js";
|
|
6
|
-
import "./sources-
|
|
7
|
-
import { A as quoteQualified, D as qualified, I as scopeTypeOf, O as quoteIdent } from "./shared-
|
|
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-
|
|
9
|
-
import { t as FIELD_VIEWS } from "./fields-
|
|
6
|
+
import "./sources-C4vkzZJV.js";
|
|
7
|
+
import { A as quoteQualified, D as qualified, I as scopeTypeOf, O as quoteIdent } from "./shared-DrGLwM3s.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-DimBcVWY.js";
|
|
9
|
+
import { t as FIELD_VIEWS } from "./fields-DI8s3cPl.js";
|
|
10
10
|
//#region src/cli/rls/permission-holders.ts
|
|
11
11
|
/**
|
|
12
12
|
* `permitted_<scope>_users(p_permission, p_id)`. Names are part of the SQL
|