permdock 0.20.1 → 0.22.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/README.md +2 -1
- package/dist/a2a/index.d.ts +5 -5
- package/dist/a2a/index.js +5 -4
- package/dist/{adoption-scan-BTG9Noyy.js → adoption-scan-_bHLMnVQ.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 +4 -4
- package/dist/ai-sdk/index.js +3 -3
- package/dist/app/index.d.ts +85 -0
- package/dist/app/index.js +91 -0
- package/dist/app-DIvM65Mv.js +24 -0
- package/dist/{approval-policies-CKlByf5o.d.ts → approval-policies-UnDSxT__.d.ts} +2 -2
- package/dist/{approval-prompt-CQFiO1KE.d.ts → approval-prompt-2hTqo6IM.d.ts} +2 -2
- package/dist/approvals/index.d.ts +3 -3
- package/dist/approvals/index.js +3 -3
- package/dist/{approvals-CuXILe52.js → approvals-B_sn4Wrn.js} +6 -6
- package/dist/{arazzo-CDXfX4u0.js → arazzo-BXD-VJU_.js} +1 -1
- package/dist/{arazzo-D4mKdaWI.js → arazzo-Ct0PGblq.js} +3 -3
- package/dist/astro/index.d.ts +6 -6
- package/dist/astro/index.js +2 -2
- package/dist/{audience-BUonniPx.js → audience-5Xx1hdIv.js} +1 -1
- package/dist/{auth-j3Eu-j4h.js → auth-BxXHxWRy.js} +1 -1
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +4 -4
- package/dist/{automation-CpOk7Tlu.d.ts → automation-B20_8UoT.d.ts} +3 -3
- package/dist/{automation-x3KEUusw.js → automation-BueW05db.js} +2 -2
- package/dist/better-auth/index.d.ts +2 -2
- package/dist/better-auth/index.js +1 -1
- package/dist/better-supabase/index.d.ts +113 -56
- package/dist/better-supabase/index.js +200 -62
- package/dist/better-supabase-DF8f8oly.js +194 -0
- package/dist/{bind-gwEbe9hL.js → bind-B4Z0U2Gr.js} +5 -5
- package/dist/{bind-CW7nsZ86.d.ts → bind-CnOMjazH.d.ts} +7 -7
- package/dist/{build-instance-DaBdCRiz.js → build-instance-B0vsViF5.js} +3 -25
- package/dist/{capability-zN6T9fxe.js → capability-CenWwTMR.js} +1 -1
- package/dist/{capability-v2xZB7us.d.ts → capability-YkRMUAsF.d.ts} +2 -2
- package/dist/{casbin-COUi09Ti.js → casbin-D5evU3lX.js} +1 -1
- package/dist/{casbin-BXlRcCdU.js → casbin-imBS3UIf.js} +1 -1
- package/dist/catalog/index.d.ts +5 -5
- package/dist/catalog/index.js +5 -5
- package/dist/catalog-C462QC3A.js +1 -0
- package/dist/{catalog-DjDc87R2.js → catalog-CoyKnU5c.js} +1 -1
- package/dist/{catalog-s0waIrfY.js → catalog-Y4CjN8NA.js} +4 -4
- package/dist/{catalog-operations-BD22drQf.js → catalog-operations-Do1eD-Rt.js} +1 -1
- package/dist/{challenge-DbkpCx_v.js → challenge-B__LcNve.js} +3 -3
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +3 -2
- 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 +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +8 -7
- package/dist/cli/index.js +3 -3
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +3 -3
- package/dist/{cloud-BW7JKfrF.js → cloud-DWCeStPH.js} +2 -2
- package/dist/{codemod-6CBQaT0x.js → codemod-B7QKJ_ak.js} +2 -2
- package/dist/{codemod-CR9EQBVd.js → codemod-BaPmaCYQ.js} +13 -6
- package/dist/{collect-DN_x7hvV.js → collect-Cr71JA7z.js} +8 -7
- package/dist/{collect-DMQ6Sxr6.js → collect-ScSG05VJ.js} +2 -2
- package/dist/collect-W9i7REKT.js +1 -0
- package/dist/compile/index.d.ts +1 -1
- package/dist/compile/index.js +1 -1
- package/dist/{compile-B_oJqmIg.js → compile-Cvru58id.js} +2 -2
- package/dist/{compile-DZftFfXc.d.ts → compile-DC-BrhH1.d.ts} +3 -3
- package/dist/{completion-CYRlOJzv.js → completion-DOUMyCwa.js} +1 -1
- package/dist/{delegation-aK4T_5WU.js → condition-evaluate-bVVRSdzq.js} +159 -159
- package/dist/{config-6iLK155o.js → config-DRp-E8Ly.js} +1 -1
- package/dist/{config-D2oXUwos.js → config-DyNanTjZ.js} +10 -8
- package/dist/{config-report-BLroaWCe.js → config-report-Bh_nLdAE.js} +2 -2
- package/dist/{config-shape-D9paLhEX.js → config-shape-C4zqzG2K.js} +9 -2
- package/dist/{context-YhyXyqBI.js → context-Cem4QafV.js} +2 -2
- package/dist/convex/index.d.ts +5 -5
- package/dist/convex/index.js +2 -2
- package/dist/{core-BwVkrpsi.js → core-CUjhfz0W.js} +6 -6
- package/dist/{core-BOeGWbcR.d.ts → core-D2JNg5jA.d.ts} +3 -3
- package/dist/coverage-D8jBJdgD.d.ts +114 -0
- package/dist/coverage-Dh2W_DmF.js +211 -0
- package/dist/{create-BezeYFcT.d.ts → create-B2tdOygC.d.ts} +7 -7
- package/dist/{create-C0R8omeF.js → create-BJ2_8NDO.js} +5 -5
- package/dist/{create-DDUFG1ul.js → create-BsL5lCWR.js} +10 -8
- package/dist/{create-DYSYYiLr.d.ts → create-CPDSbK1a.d.ts} +5 -5
- package/dist/{create-DMCC5ZOi.d.ts → create-oMCcZV4X.d.ts} +9 -9
- package/dist/{credential-B3Hj4puZ.js → credential-Bap3HClV.js} +4 -4
- package/dist/{server-D0PW6ZCw.js → credentials-BXV0oz56.js} +3 -146
- package/dist/credentials-DPX140fN.d.ts +125 -0
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-De8cw3MW.d.ts → denied-text-BXQkWU7d.d.ts} +2 -2
- package/dist/{describe-DibQM6g-.d.ts → describe-DVobr5FX.d.ts} +2 -2
- package/dist/{diff-Bd1-VCe5.js → diff-BR9JArxz.js} +6 -6
- package/dist/{diff-DXRNcjpg.js → diff-Jc_kbDz-.js} +1 -1
- package/dist/{doctor-CJcS0Mrq.js → doctor-BBMW5ZT_.js} +310 -36
- package/dist/{doctor-DYTgibLC.js → doctor-DhqSiPkq.js} +3 -3
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/drizzle/index.js +1 -1
- package/dist/elysia/index.d.ts +5 -5
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-OTE9u4Wk.d.ts → errors-D_JIQJYb.d.ts} +1 -1
- package/dist/{evaluate-Dcq_U2TV.js → evaluate-B5yZHmts.js} +16 -16
- package/dist/{evaluations-CNMVJVD6.js → evaluations-BzTDWO4m.js} +57 -57
- package/dist/{evaluations-BgxEfPL7.d.ts → evaluations-DQYfh4Jh.d.ts} +3 -3
- package/dist/eve/index.d.ts +5 -5
- package/dist/eve/index.js +3 -3
- package/dist/express/index.d.ts +5 -5
- package/dist/express/index.js +3 -3
- package/dist/fastify/index.d.ts +5 -5
- package/dist/fastify/index.js +3 -3
- package/dist/{fetch-adapter-DCQ4pZxf.d.ts → fetch-adapter-DxqsIXSO.d.ts} +4 -4
- package/dist/{fetch-adapter-acq4dPX3.js → fetch-adapter-MoYZ-vF5.js} +5 -4
- package/dist/{fields-D_TfExiI.js → fields-CVyOk-f1.js} +2 -2
- package/dist/{fixtures-Cemqurt8.js → fixtures-BVZc7OCF.js} +1 -1
- package/dist/{from-snapshot-DHnb8Fh4.js → from-snapshot-oR_N97dM.js} +346 -14
- package/dist/{gen-gv_WHBIG.js → gen-DXXoFjyf.js} +1 -1
- package/dist/{gen-CH50v9VI.js → gen-WdycZ_-b.js} +5 -5
- package/dist/{grantee-conditions-DX4K_gGI.js → grantee-conditions-Dzprappv.js} +1 -1
- package/dist/{grantee-match-BP-k4vRJ.js → grantee-match-8J2y60MF.js} +3 -3
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-D-MXwkOF.js → helpers-DzBIfL1N.js} +25 -25
- package/dist/hono/index.d.ts +5 -5
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-C2Pmhy2x.js → hosted-C5I2TSXm.js} +4 -4
- package/dist/{hosted-yhyAuQkL.d.ts → hosted-DXq1plaP.d.ts} +1 -1
- package/dist/{http-DhMWeB_h.js → http-dptLQzPP.js} +1 -1
- package/dist/{expiry-6XByK0dm.js → ids-DzhJaCUj.js} +23 -23
- package/dist/{import-BlwuuZkr.js → import-BE5sDazm.js} +2 -2
- package/dist/{import-C2ExjVvv.js → import-CvXswHDy.js} +2 -2
- package/dist/index-BcS8c_2S.d.ts +101 -0
- package/dist/{index--AwSBzJC.d.ts → index-BdZpqhJK.d.ts} +2 -2
- package/dist/{index-CLbGOPBr.d.ts → index-C-R8lBPb.d.ts} +3 -3
- package/dist/{index-CruReRkB.d.ts → index-C_8uxAlv.d.ts} +5 -5
- package/dist/{index-D7xGi1LS.d.ts → index-Cjfa1Uwr.d.ts} +22 -40
- package/dist/{index-Bt37QovT.d.ts → index-iIsqXFVu.d.ts} +6 -6
- package/dist/index.d.ts +19 -20
- package/dist/index.js +25 -24
- package/dist/{init-CalppFAI.js → init-B_S8Xdz1.js} +4 -4
- package/dist/{init-B62H9Kyx.js → init-CqGHcvyR.js} +2 -2
- package/dist/{instance-options-VPsNQsTH.d.ts → instance-options-C6gEDOts.d.ts} +1 -1
- package/dist/instance-options-URVwqpMW.js +24 -0
- package/dist/{instance-snapshot-SX8zH_1t.js → instance-snapshot-D_dGTq--.js} +10 -10
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +2 -2
- package/dist/{kernel-_QEUOSU0.js → kernel-NmxiWII2.js} +8 -8
- package/dist/kysely/index.d.ts +3 -3
- package/dist/kysely/index.js +1 -1
- package/dist/limits-CAhpRrhk.js +167 -0
- package/dist/{load-BaEamml-.js → load-C4p4VgwR.js} +2 -2
- package/dist/load-DiBUJx77.js +1 -0
- package/dist/{login-dDb_8muO.js → login-CzwlsBEO.js} +4 -4
- package/dist/{login-MxQV1BLh.js → login-DoLxv1s5.js} +3 -3
- package/dist/{manifest-DvDzxhy6.js → manifest-BAf7cgRx.js} +35 -35
- package/dist/{map-claims-PQwHynxV.js → map-claims-CAa_bQt9.js} +1 -1
- package/dist/{map-error-EOhahOVA.js → map-error-p4ROJ_26.js} +1 -1
- package/dist/mcp/index.d.ts +9 -9
- package/dist/mcp/index.js +9 -8
- package/dist/{migrate-CkLHdwuH.js → migrate-DVsxeE0y.js} +1 -1
- package/dist/{module-values-BYuNtdK5.js → module-values-BLiVlO1X.js} +3 -3
- package/dist/nest/index.d.ts +5 -5
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +46 -17
- package/dist/next/index.js +58 -23
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +5 -5
- package/dist/node/index.js +2 -2
- package/dist/openai/index.d.ts +5 -5
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +5 -59
- package/dist/openapi/index.js +3 -2
- package/dist/{openapi-BOsx0xn9.js → openapi-Cc-aS9xC.js} +6 -135
- package/dist/{openapi-BkGtE5kX.js → openapi-DroBcLJZ.js} +2 -2
- package/dist/{openapi-DKePsnln.js → openapi-EmvKwuWj.js} +4 -4
- package/dist/{operations-Ci_rT6Uo.d.ts → operations-BMPx7HyO.d.ts} +1 -1
- package/dist/optional-8TKc-0j4.js +47 -0
- package/dist/orpc/index.d.ts +7 -7
- package/dist/orpc/index.js +4 -4
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +1 -1
- package/dist/{output-B2h-2g3F.js → output-CYgfpT6o.js} +1 -1
- package/dist/{ownership-MGHa5vfX.js → ownership-adPAsUwY.js} +15 -13
- package/dist/{parse-CXTT7hBq.js → parse-CORUNcCo.js} +1 -1
- package/dist/{parse-local-manifest-CE4tgFsj.d.ts → parse-local-manifest-BaCqsqwC.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +4 -3
- package/dist/{permdock-C1DN_7a-.js → permdock-B5LyNVgn.js} +71 -34
- package/dist/{permdock-D4F2p5J8.d.ts → permdock-BaB-KQqn.d.ts} +51 -9
- package/dist/{permissions-8N2yFsUM.js → permissions-COpRGKt7.js} +1 -1
- package/dist/{permissions-Bx6UI8n1.d.ts → permissions-DriWkV7q.d.ts} +1 -2
- package/dist/{policy-from-catalog-CUNlpgz0.js → policy-from-catalog-Cy103lsm.js} +8 -8
- package/dist/{policy-types-BI9C5Sp5.d.ts → policy-types-rNfz7t0M.d.ts} +9 -3
- package/dist/{policy-CaAME-Rh.js → policy-wGzbAPQF.js} +7 -7
- package/dist/{policy-Dh9WVSVz.d.ts → policy-x8RBKW8d.d.ts} +2 -2
- package/dist/{postgrest-CWCCbaxm.d.ts → postgrest-Cn0Res25.d.ts} +9 -21
- package/dist/powersync-BdoR7nwS.js +1 -0
- package/dist/{powersync-Deim9O47.js → powersync-BeI0VmEK.js} +2 -2
- package/dist/{powersync-CB8RwcB4.js → powersync-Dpa5AnnN.js} +11 -11
- package/dist/preset/index.js +1 -1
- package/dist/{preset-pPrVyGU5.js → preset-Bn5Z54cH.js} +5 -6
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.js +1 -1
- package/dist/{protected-action-ua0cx5cW.d.ts → protected-action-C4aj1KjO.d.ts} +6 -7
- package/dist/{protected-action-CD1HXwQK.js → protected-action-E7Sdt_Dt.js} +1 -1
- package/dist/{provider-D_hgjZRa.d.ts → provider-B-1DlOGM.d.ts} +1 -1
- package/dist/{provider-qESIf_C0.js → provider-DKO9KHua.js} +2 -2
- package/dist/{provider-store-BTHGJH9j.js → provider-store-D4PU1my_.js} +2 -2
- package/dist/{pull-BxqVL4Es.js → pull-3tkn25ll.js} +5 -5
- package/dist/pull-D90HqWNP.js +1 -0
- package/dist/{push-D2SsRW0U.js → push-dMyKdlEm.js} +6 -6
- package/dist/{pushed-policy-BERO0x9O.js → pushed-policy-Bi5-il4C.js} +2 -2
- package/dist/{pushed-policy-P0hgyLBh.d.ts → pushed-policy-P55cJNx5.d.ts} +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +3 -3
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +9 -9
- package/dist/react-native/index.js +7 -7
- package/dist/{relation-walk-DK_gkgL7.js → relation-walk-BDTaTKTM.js} +1 -1
- package/dist/{relations-BxvRvDHK.js → relations-CMsJ1ARY.js} +1 -1
- package/dist/{replay-DYXI4gRN.d.ts → replay-DKhFvt0L.d.ts} +1 -1
- package/dist/{request-context-BPTi68z5.js → request-context-5gl_oxO1.js} +2 -2
- package/dist/resend/index.d.ts +4 -4
- package/dist/resend/index.js +2 -2
- package/dist/{resolve-names-BZQZRnMH.js → resolve-names-BnGJU88N.js} +4 -4
- package/dist/{rls-DpoJ5gCg.js → rls-DIYSRnDZ.js} +1 -1
- package/dist/{rls-OPorg_2G.js → rls-qrehUPf_.js} +45 -18
- package/dist/{role-builder-C5AgaC1x.js → role-builder-boQiUvfo.js} +3 -3
- package/dist/{rpc-D2LnFELm.d.ts → rpc-BqRiVpbP.d.ts} +2 -2
- package/dist/{rpc-DdkbQVlT.js → rpc-Dhi55Whd.js} +2 -2
- package/dist/run-elFdnSZx.js +1 -0
- package/dist/{run-YCpANf1B.js → run-oNqBe0gc.js} +3 -3
- package/dist/{run-ticket-CjvXr6wj.js → run-ticket-Ddxt9OuU.js} +2 -2
- package/dist/{run-ticket-94DOS9Cd.d.ts → run-ticket-Dulj4RQk.d.ts} +2 -2
- package/dist/{saas-BEXnrH9H.js → saas-DABv6vjy.js} +6 -5
- package/dist/{scan-COvn7ZjN.js → scan-BYXqcgON.js} +1 -1
- package/dist/{schema-BfSDo7Xj.js → schema-Wf-SvlHG.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/scim/index.js +1 -1
- package/dist/{scopes-BSdYaGHs.js → scopes-gdH__vDZ.js} +1 -1
- package/dist/server/index.d.ts +11 -10
- package/dist/server/index.js +7 -6
- package/dist/server-CKjFooaJ.js +147 -0
- package/dist/{server-types-ChzXWU4Y.d.ts → server-types--_Hann81.d.ts} +10 -9
- package/dist/{shared-sW3VYchq.js → shared-DfaIWvIJ.js} +11 -2
- package/dist/{sink-RwmP7ZHs.d.ts → sink-Cs6z34AX.d.ts} +4 -4
- package/dist/{skills-N2Hd8KN8.js → skills-417bOj4o.js} +1 -1
- package/dist/{skills-Ce4C2dq1.js → skills-B9U465B7.js} +2 -2
- package/dist/{snapshot-DHPih65J.js → snapshot-C2j96x97.js} +4 -4
- package/dist/{snapshot-cache-MPinwwgZ.d.ts → snapshot-cache-Cc7VNabe.d.ts} +1 -1
- package/dist/solid/index.d.ts +6 -7
- package/dist/solid/index.js +2 -2
- package/dist/solid-start/index.d.ts +6 -6
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-sgQlMfmz.d.ts → sources-BfTza0zT.d.ts} +1 -1
- package/dist/{src-B8SQNsvw.js → src-BG9YJM3Q.js} +97 -247
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +3 -3
- package/dist/{standard-webhooks-CFZIYtBF.d.ts → standard-webhooks-CJBgfl7y.d.ts} +2 -2
- package/dist/{store-CSOsXd5s.js → store-BpKH-pLm.js} +2 -2
- package/dist/{store-Dpg_fSNQ.d.ts → store-DSyjHD5-.d.ts} +5 -5
- package/dist/{store-options-CDvoX52-.js → store-options-CXv6BHH6.js} +5 -6
- package/dist/{stores-PpYVQ5yF.js → stores-BuqAHjp_.js} +1 -1
- package/dist/{stores-C2A6KsxE.d.ts → stores-C6-7TPTV.d.ts} +6 -7
- package/dist/{postgrest-BrjrckDG.js → subject-BqFwS6l3.js} +214 -319
- package/dist/subject-cache-BT1fGuea.js +193 -0
- package/dist/subject-cache-d_Z4KAnm.d.ts +144 -0
- package/dist/supabase/index.d.ts +6 -5
- package/dist/supabase/index.js +3 -2
- package/dist/supabase/middleware.d.ts +6 -6
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-zL7PC3RG.js → supabase-D0J99yqL.js} +2 -2
- package/dist/{supabase-CVZuytCC.js → supabase-DnazO6W4.js} +3 -3
- package/dist/{supabase-hook-BCSwK5x-.js → supabase-hook-Bh5syR9N.js} +174 -62
- package/dist/supabase-hook-CVAenq-w.js +1 -0
- package/dist/{supautils-7UES0i4a.js → supautils-ChXR-4Or.js} +302 -43
- package/dist/{support-session-BsmPCbz8.js → support-session-BGeEYDSq.js} +2 -2
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +3 -3
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +1 -1
- package/dist/svelte/source.d.ts +5 -5
- package/dist/svelte/source.js +2 -2
- package/dist/sveltekit/index.d.ts +6 -6
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-DSX_Ma_n.js → tables-CbEOy2Ma.js} +137 -55
- package/dist/tanstack-start/index.d.ts +6 -6
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenancy-DvOHHk3-.js → tenancy-BlxY5T0q.js} +2 -2
- package/dist/terminal/index.d.ts +6 -6
- package/dist/terminal/index.js +6 -6
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +35 -2
- package/dist/testing/fixtures/index.js +39 -2
- package/dist/testing/index.d.ts +41 -25
- package/dist/testing/index.js +114 -26
- package/dist/testing/saas/index.d.ts +5 -5
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.d.ts +1 -1
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +6 -6
- package/dist/trpc/index.js +4 -4
- package/dist/{type-helpers-BjOLGVy1.d.ts → type-helpers-iXJEIDe7.d.ts} +3 -4
- package/dist/{types-p8mhWTcR.d.ts → types-B9F0EZAF.d.ts} +3 -3
- package/dist/{types-DZwEOsK1.d.ts → types-BSNZMp5b.d.ts} +1 -1
- package/dist/{types-DnzRZjEu.d.ts → types-BpxdxaRD.d.ts} +5 -5
- package/dist/{types-C5p2hoBR.d.ts → types-CD1qmxdx.d.ts} +4 -4
- package/dist/{types-D1NjjwI4.d.ts → types-CS1DI_Ke.d.ts} +40 -9
- package/dist/{types-CMclYgSk.d.ts → types-C_a44wSr.d.ts} +3 -3
- package/dist/{types-DBVSljAx.d.ts → types-Cq2rvv-C.d.ts} +3 -3
- package/dist/{types--_lpWUGV.d.ts → types-CuDXvyIT.d.ts} +5 -5
- package/dist/{types-7Vlz1Wi2.d.ts → types-DAyp592k.d.ts} +2 -2
- package/dist/{types-Drs3OOAy.d.ts → types-NikV1pND.d.ts} +4 -4
- package/dist/{types-BzxA2OAD.d.ts → types-ZfjQB0KC.d.ts} +2 -2
- package/dist/{types-D8JVDWOr.d.ts → types-_pi9kxS2.d.ts} +2 -2
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-CUnw73Y-.js → usage-0wsl83uw.js} +10 -10
- package/dist/{usage-BcAqmjkj.js → usage-Bl-BkXEq.js} +1 -1
- package/dist/usage-CmyGbo4e.js +1 -0
- package/dist/{validation-error-DkOK9zUE.d.ts → validation-error-DLAYFlkr.d.ts} +1 -1
- package/dist/{verify-V08pirDB.js → verify-BSLotSa0.js} +41 -24
- package/dist/version-sources-BC3hf2ME.js +34 -0
- package/dist/{permission-types-CAY-GU7e.d.ts → vocabulary-DeZvUaTw.d.ts} +69 -1
- package/dist/vue/index.d.ts +6 -7
- package/dist/vue/index.js +2 -2
- package/dist/{waiter-BjVI_Byg.d.ts → waiter-cbK1CBhT.d.ts} +2 -2
- package/dist/{watch-Dz2LNM1R.js → watch-BigZ260i.js} +2 -2
- package/dist/watch-CHURMgrv.js +1 -0
- package/dist/webmcp/index.d.ts +2 -2
- package/dist/{who-can-CZeAwQZD.js → who-can-CjfMP9a4.js} +8 -8
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +6 -5
- package/dist/workflow-sdk/index.d.ts +5 -5
- package/dist/{wrap-CE5lxje7.d.ts → wrap-B-k2qHJx.d.ts} +2 -2
- package/package.json +16 -4
- package/skills/permdock-wire/references/presets-and-recipes.md +2 -2
- package/dist/better-supabase-ayun1IKE.js +0 -122
- package/dist/catalog-BTPySmbp.js +0 -1
- package/dist/collect-eSTXOZDC.js +0 -1
- package/dist/index-B_I6N8Ju.d.ts +0 -222
- package/dist/load-CjnlPxpL.js +0 -1
- package/dist/powersync-Cs1E04s6.js +0 -1
- package/dist/pull-BLT25Y5C.js +0 -1
- package/dist/run-CW0QsyA9.js +0 -1
- package/dist/supabase-hook-7XxWGHQF.js +0 -1
- package/dist/usage-BdIS9NfN.js +0 -1
- package/dist/version-cache-q5cpaDSt.d.ts +0 -57
- package/dist/vocabulary-DEJ5j4mR.d.ts +0 -70
- package/dist/watch-CS69ftMP.js +0 -1
- package/dist/where-scope-BAyOsPQW.js +0 -332
- package/dist/{approval-normalize-hlfO9BJv.js → approval-normalize-DNLW0zOM.js} +1 -1
- package/dist/{body-C9JbIoqb.js → body-B3ylkmmE.js} +1 -1
- package/dist/{catalog-doc-nrgfbh8I.js → catalog-doc-Zi0jRpyH.js} +2 -2
- package/dist/{device-BwbJNmb2.js → device-BkSynWdg.js} +1 -1
- package/dist/{prompt-BYc6drYW.js → prompt-D1Gj1W4Y.js} +1 -1
- package/dist/{scim-C30QBBoF.js → scim-BG6uPUeW.js} +1 -1
- package/dist/{wrap-C5PWzgkq.js → wrap-BKU5Arsu.js} +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { c as listPermissions, u as renamedKeys } from "./permission-registry-B8tYxPIt.js";
|
|
2
|
-
import { d as scopeList, l as scopeChain, s as resolveScope } from "./scopes-BSdYaGHs.js";
|
|
3
2
|
import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
|
|
4
|
-
import { l as
|
|
3
|
+
import { c as rootScope, d as scopeList, l as scopeChain, s as resolveScope } from "./scopes-gdH__vDZ.js";
|
|
4
|
+
import { l as policyLevels } from "./policy-wGzbAPQF.js";
|
|
5
5
|
import { a as describeError, i as configError } from "./errors-BhRkoNS7.js";
|
|
6
6
|
import "./budget-BBCPDOGP.js";
|
|
7
7
|
import { d as sqlTextArray, i as qualifySqlTable } from "./sql-0WjxIp9g.js";
|
|
8
|
-
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-
|
|
8
|
+
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-Cvru58id.js";
|
|
9
9
|
import { l as roleColumn } from "./sources-C4vkzZJV.js";
|
|
10
10
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
11
11
|
import { c as parseSplit } from "./output-files-CM0BnH05.js";
|
|
12
|
-
import { x as resolveAuthorize } from "./supabase-hook-
|
|
13
|
-
import { A as quoteQualified, C as parseMembershipsFlag, D as qualified, F as firstScopeType,
|
|
14
|
-
import {
|
|
15
|
-
import { o as assignableRoles, r as unsatisfiedKinds, t as ownershipRules, u as roleNames } from "./ownership-
|
|
12
|
+
import { x as resolveAuthorize } from "./supabase-hook-Bh5syR9N.js";
|
|
13
|
+
import { A as quoteQualified, C as parseMembershipsFlag, D as qualified, E as helperSchema, F as firstScopeType, I as idTypeOf, L as scopeTypeOf, O as quoteIdent, a as customRolesOn, j as quoteTable, k as quoteLiteral, l as USER_ID_HELPER, r as HELPERS, s as signedIn, t as CUSTOM_ROLES, y as subjectIdSql, z as tenantTypeOf } from "./shared-DfaIWvIJ.js";
|
|
14
|
+
import { $ as byKey, B as memoizes, C as permittedByPermissionHelper, D as memoReadsSql, L as memoDiscriminatorSql, M as memoReadTriggersSql, Ot as checkSuspension, Q as byCodeUnit, R as memoReadSql, X as rolesTableScope, Y as raiseSql, a as tablelessResources, at as graphHelper, bt as permittedIdsHelper, c as graphPlan, et as API_KEY_ALLOWS, gt as memberIdsHelper, i as tableNames, j as tokenScopesPlan, k as TOKEN_SCOPE_ALLOWS, n as resolveVias, o as closureDepths, ot as graphSqlName, q as currentKeyExpr, rt as apiKeysPlan, s as graphIdsSql, t as checkSharedTables, y as PERMISSION_HELPERS, z as memoWriteSql } from "./tables-CbEOy2Ma.js";
|
|
15
|
+
import { o as assignableRoles, r as unsatisfiedKinds, t as ownershipRules, u as roleNames } from "./ownership-adPAsUwY.js";
|
|
16
16
|
import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
|
|
17
17
|
import { i as group, o as sqlStatements } from "./deciding-columns-NB4wcyBf.js";
|
|
18
|
-
import { d as orSql, h as branchClauses } from "./fields-
|
|
19
|
-
import { t as resolveNames } from "./resolve-names-
|
|
20
|
-
import {
|
|
18
|
+
import { d as orSql, h as branchClauses } from "./fields-CVyOk-f1.js";
|
|
19
|
+
import { t as resolveNames } from "./resolve-names-BnGJU88N.js";
|
|
20
|
+
import { h as tableFor } from "./verify-BSLotSa0.js";
|
|
21
21
|
//#region src/cli/rls/custom-role-rebuild.ts
|
|
22
22
|
const PREFIX = "PermDock CLI";
|
|
23
23
|
/** A column of the roles-table row `r`. */
|
|
@@ -342,6 +342,194 @@ create trigger ${quoteIdent(trigger)}
|
|
|
342
342
|
return `${chunks.join("\n\n")}\n`;
|
|
343
343
|
}
|
|
344
344
|
//#endregion
|
|
345
|
+
//#region src/cli/rls/row-memo.ts
|
|
346
|
+
const TERMS = "v_permdock_terms";
|
|
347
|
+
const CANDIDATES$1 = "permdock_candidates";
|
|
348
|
+
const PAIRS = 50;
|
|
349
|
+
const IDENT = /"(?:[^"]|"")+"|[a-z_][a-z0-9_]*/uy;
|
|
350
|
+
const WORD = /true\b|false\b|null\b|-?\d+(?:\.\d+)?/uy;
|
|
351
|
+
const CAST = /::[a-z_][a-z0-9_]*/uy;
|
|
352
|
+
const SET_BEFORE = /\b(?:in|array|any|all|some)\s*$/u;
|
|
353
|
+
const EXISTS_BEFORE = /\bexists\s*$/u;
|
|
354
|
+
function sticky(pattern, sql, at) {
|
|
355
|
+
pattern.lastIndex = at;
|
|
356
|
+
return pattern.exec(sql);
|
|
357
|
+
}
|
|
358
|
+
function spaces(sql, at) {
|
|
359
|
+
let index = at;
|
|
360
|
+
while (sql[index] === " " || sql[index] === "\n") index += 1;
|
|
361
|
+
return index;
|
|
362
|
+
}
|
|
363
|
+
function literalEnd(sql, at, quote) {
|
|
364
|
+
let index = at + 1;
|
|
365
|
+
while (index < sql.length) {
|
|
366
|
+
if (sql[index] === quote) {
|
|
367
|
+
if (sql[index + 1] !== quote) return index + 1;
|
|
368
|
+
index += 1;
|
|
369
|
+
}
|
|
370
|
+
index += 1;
|
|
371
|
+
}
|
|
372
|
+
return sql.length;
|
|
373
|
+
}
|
|
374
|
+
function identAt(sql, at) {
|
|
375
|
+
const match = sticky(IDENT, sql, at);
|
|
376
|
+
if (match === null) return;
|
|
377
|
+
const [text] = match;
|
|
378
|
+
return {
|
|
379
|
+
name: text.startsWith("\"") ? text.slice(1, -1).replaceAll("\"\"", "\"") : text,
|
|
380
|
+
end: at + text.length
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function argEnd(sql, at) {
|
|
384
|
+
if (sql[at] === "'") {
|
|
385
|
+
const end = literalEnd(sql, at, "'");
|
|
386
|
+
const cast = sticky(CAST, sql, end);
|
|
387
|
+
return cast === null ? end : end + cast[0].length;
|
|
388
|
+
}
|
|
389
|
+
if (sql.startsWith("array(", at)) return termAt(sql, at + 5)?.end;
|
|
390
|
+
const word = sticky(WORD, sql, at);
|
|
391
|
+
return word === null ? void 0 : at + word[0].length;
|
|
392
|
+
}
|
|
393
|
+
function callAt(sql, at) {
|
|
394
|
+
const schema = identAt(sql, at);
|
|
395
|
+
if (schema === void 0 || sql[schema.end] !== ".") return;
|
|
396
|
+
const name = identAt(sql, schema.end + 1);
|
|
397
|
+
if (name === void 0 || sql[name.end] !== "(") return;
|
|
398
|
+
let index = spaces(sql, name.end + 1);
|
|
399
|
+
if (sql[index] === ")") return {
|
|
400
|
+
schema: schema.name,
|
|
401
|
+
name: name.name,
|
|
402
|
+
end: index + 1
|
|
403
|
+
};
|
|
404
|
+
for (;;) {
|
|
405
|
+
const end = argEnd(sql, index);
|
|
406
|
+
if (end === void 0) return;
|
|
407
|
+
index = spaces(sql, end);
|
|
408
|
+
if (sql[index] === ")") return {
|
|
409
|
+
schema: schema.name,
|
|
410
|
+
name: name.name,
|
|
411
|
+
end: index + 1
|
|
412
|
+
};
|
|
413
|
+
if (sql[index] !== ",") return;
|
|
414
|
+
index = spaces(sql, index + 1);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
function termAt(sql, at) {
|
|
418
|
+
if (!sql.startsWith("(select ", at)) return;
|
|
419
|
+
const call = callAt(sql, at + 8);
|
|
420
|
+
if (call === void 0 || sql[call.end] !== ")") return;
|
|
421
|
+
return {
|
|
422
|
+
...call,
|
|
423
|
+
end: call.end + 1
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
function memoTypes(ctx, policy) {
|
|
427
|
+
const types = /* @__PURE__ */ new Map([
|
|
428
|
+
[USER_ID_HELPER, "uuid"],
|
|
429
|
+
[HELPERS.has, "boolean"],
|
|
430
|
+
[PERMISSION_HELPERS.has, "boolean"],
|
|
431
|
+
[API_KEY_ALLOWS, "boolean"],
|
|
432
|
+
[TOKEN_SCOPE_ALLOWS, "boolean"]
|
|
433
|
+
]);
|
|
434
|
+
for (const name of graphPlan(policy).keys()) types.set(graphHelper(name), "text");
|
|
435
|
+
for (const scope of ctx.scopes) {
|
|
436
|
+
const type = scopeTypeOf(ctx, scope.name);
|
|
437
|
+
types.set(permittedIdsHelper(scope.name), type);
|
|
438
|
+
types.set(permittedByPermissionHelper(scope.name), type);
|
|
439
|
+
types.set(memberIdsHelper(scope.name), type);
|
|
440
|
+
}
|
|
441
|
+
return types;
|
|
442
|
+
}
|
|
443
|
+
function rewrite(sql, schema, types, terms) {
|
|
444
|
+
const used = /* @__PURE__ */ new Set();
|
|
445
|
+
let out = "";
|
|
446
|
+
let index = 0;
|
|
447
|
+
while (index < sql.length) {
|
|
448
|
+
const char = sql[index] ?? "";
|
|
449
|
+
if (char === "'" || char === "\"") {
|
|
450
|
+
const end = literalEnd(sql, index, char);
|
|
451
|
+
out += sql.slice(index, end);
|
|
452
|
+
index = end;
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
const term = char === "(" ? termAt(sql, index) : void 0;
|
|
456
|
+
const type = term === void 0 || term.schema !== schema ? void 0 : types.get(term.name);
|
|
457
|
+
const before = type === void 0 ? "" : sql.slice(0, index);
|
|
458
|
+
if (term === void 0 || type === void 0 || EXISTS_BEFORE.test(before)) {
|
|
459
|
+
out += char;
|
|
460
|
+
index += 1;
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
const text = sql.slice(index, term.end);
|
|
464
|
+
const set = SET_BEFORE.test(before);
|
|
465
|
+
const id = `${set ? "s" : "v"}${text}`;
|
|
466
|
+
const slot = terms.get(id) ?? {
|
|
467
|
+
key: quoteLiteral(`t${String(terms.size)}`),
|
|
468
|
+
value: set ? `array${text}` : text
|
|
469
|
+
};
|
|
470
|
+
terms.set(id, slot);
|
|
471
|
+
used.add(slot);
|
|
472
|
+
out += set ? `(select pdm.v::${type} from pg_catalog.jsonb_array_elements_text(${TERMS} -> ${slot.key}) pdm(v))` : `((${TERMS} ->> ${slot.key})::${type})`;
|
|
473
|
+
index = term.end;
|
|
474
|
+
}
|
|
475
|
+
return {
|
|
476
|
+
sql: out,
|
|
477
|
+
used: [...used]
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
function computeSql(used) {
|
|
481
|
+
const pairs = used.map((slot) => `${slot.key}, to_jsonb(${slot.value})`);
|
|
482
|
+
const chunks = [];
|
|
483
|
+
for (let at = 0; at < pairs.length; at += PAIRS) chunks.push(`jsonb_build_object(${pairs.slice(at, at + PAIRS).join(", ")})`);
|
|
484
|
+
return chunks.join(" || ");
|
|
485
|
+
}
|
|
486
|
+
function memoRowSql(ctx, policy, fn, params, resource, arms, candidates) {
|
|
487
|
+
if (!memoizes(ctx)) return;
|
|
488
|
+
const types = memoTypes(ctx, policy);
|
|
489
|
+
const terms = /* @__PURE__ */ new Map();
|
|
490
|
+
const rewritten = arms.map((arm) => ({
|
|
491
|
+
key: arm.key,
|
|
492
|
+
...rewrite(arm.sql, helperSchema(ctx), types, terms)
|
|
493
|
+
}));
|
|
494
|
+
if (terms.size === 0) return;
|
|
495
|
+
const computed = rewritten.filter((arm) => arm.used.length > 0).map((arm) => ` when ${quoteLiteral(arm.key)} then ${computeSql(arm.used)}`);
|
|
496
|
+
const where = `case p_permission\n${rewritten.map((arm) => arm.sql).join("\n")}\n else false\n end`;
|
|
497
|
+
return `create or replace function ${fn}(${params}, p_permission text)
|
|
498
|
+
returns boolean
|
|
499
|
+
language plpgsql
|
|
500
|
+
volatile
|
|
501
|
+
security definer
|
|
502
|
+
cost 1000
|
|
503
|
+
set search_path = ''
|
|
504
|
+
as $$
|
|
505
|
+
declare
|
|
506
|
+
v_permdock_key text := 'permdock.m.' || ${quoteLiteral(resource)} || '.r' || (hashtext(p_permission) & 1023)::text;
|
|
507
|
+
v_permdock_disc text := ${memoDiscriminatorSql(`${subjectIdSql(ctx)}::text`, "p_permission")};
|
|
508
|
+
v_permdock_memo jsonb := ${memoReadSql(ctx.memo, "v_permdock_key")}::jsonb;
|
|
509
|
+
${TERMS} jsonb;
|
|
510
|
+
begin
|
|
511
|
+
if v_permdock_memo is not null and (v_permdock_memo ->> 'k') = v_permdock_disc then
|
|
512
|
+
${TERMS} := v_permdock_memo -> 'v';
|
|
513
|
+
else
|
|
514
|
+
${TERMS} := case p_permission
|
|
515
|
+
${computed.join("\n")}
|
|
516
|
+
else '{}'::jsonb
|
|
517
|
+
end;
|
|
518
|
+
perform ${memoWriteSql(ctx.memo, "v_permdock_key", `jsonb_build_object('k', v_permdock_disc, 'v', ${TERMS})::text`)};
|
|
519
|
+
end if;
|
|
520
|
+
return exists (
|
|
521
|
+
with ${candidates}
|
|
522
|
+
select 1 from ${CANDIDATES$1} where ${where}
|
|
523
|
+
);
|
|
524
|
+
end;
|
|
525
|
+
$$;`;
|
|
526
|
+
}
|
|
527
|
+
function memoRowTriggersSql(ctx, policy, tables) {
|
|
528
|
+
const plan = graphPlan(policy);
|
|
529
|
+
if (!memoizes(ctx) || plan.size === 0) return "";
|
|
530
|
+
return memoReadTriggersSql(ctx, graphIdsSql(ctx, plan, tables), memoReadsSql(ctx));
|
|
531
|
+
}
|
|
532
|
+
//#endregion
|
|
345
533
|
//#region src/cli/rls/rows.ts
|
|
346
534
|
/**
|
|
347
535
|
* `permitted_<resource>_rows(p_permission)`: the resource's row ids the subject
|
|
@@ -394,19 +582,20 @@ function usingOf(branches) {
|
|
|
394
582
|
const parts = branches.map(clauseOf);
|
|
395
583
|
return parts.length === 0 ? void 0 : orSql(parts);
|
|
396
584
|
}
|
|
397
|
-
function permissionCase(key, branches) {
|
|
585
|
+
function permissionCase(key, branches, tenantFirst) {
|
|
398
586
|
const allow = usingOf(branches.filter((branch) => branch.effect === "allow"));
|
|
399
587
|
if (allow === void 0) return;
|
|
400
588
|
const deny = usingOf(branches.filter((branch) => branch.effect === "deny"));
|
|
401
589
|
const granted = `coalesce((${allow}), false)`;
|
|
402
|
-
|
|
590
|
+
const first = tenantFirst === void 0 ? "" : `${tenantFirst} and `;
|
|
591
|
+
return ` when ${quoteLiteral(key)} then ${first}${deny === void 0 ? granted : `${granted} and (${deny}) is not true`}`;
|
|
403
592
|
}
|
|
404
|
-
function forUserSql(ctx, fn, helper, ids) {
|
|
593
|
+
function forUserSql(ctx, fn, helper, ids, idType) {
|
|
405
594
|
const user = ctx.dialect === "supabase" ? "uuid" : "text";
|
|
406
|
-
const signature = `${user}, text, ${ids ?
|
|
595
|
+
const signature = `${user}, text, ${ids ? `${idType}[], ` : ""}jsonb`;
|
|
407
596
|
const call = `${helper}(p_permission${ids ? ", p_ids" : ""})`;
|
|
408
|
-
const head = `create or replace function ${fn}(p_user ${user}, p_permission text, ${ids ?
|
|
409
|
-
returns setof
|
|
597
|
+
const head = `create or replace function ${fn}(p_user ${user}, p_permission text, ${ids ? `p_ids ${idType}[], ` : ""}p_claims jsonb default '{}')
|
|
598
|
+
returns setof ${idType}
|
|
410
599
|
language plpgsql
|
|
411
600
|
volatile
|
|
412
601
|
security definer
|
|
@@ -455,54 +644,96 @@ function inheritTargets(policy) {
|
|
|
455
644
|
for (const grant of policy.grants) for (const item of flattenGrantee(grant.to)) if (item.kind === "inherit") out.add(item.resource);
|
|
456
645
|
return [...out].toSorted();
|
|
457
646
|
}
|
|
647
|
+
/**
|
|
648
|
+
* `cost 1000`, so the planner runs a helper after the cheap filters, and
|
|
649
|
+
* `parallel safe` unless the scope helpers it calls keep a `set_config` memo,
|
|
650
|
+
* which a parallel worker cannot write.
|
|
651
|
+
*/
|
|
652
|
+
function plannerOf(ctx) {
|
|
653
|
+
return `cost 1000${memoizes(ctx) ? "" : "\nparallel safe"}`;
|
|
654
|
+
}
|
|
458
655
|
const CANDIDATES = "permdock_candidates";
|
|
459
656
|
function stubSql(ctx, resource) {
|
|
460
657
|
const fn = qualified(ctx, rowsHelper(resource));
|
|
461
|
-
|
|
462
|
-
|
|
658
|
+
const type = idTypeOf(ctx, resource);
|
|
659
|
+
return ["p_permission text", `p_permission text, p_ids ${type}[]`].map((parameters) => `create or replace function ${fn}(${parameters})
|
|
660
|
+
returns setof ${type}
|
|
463
661
|
language sql
|
|
464
662
|
stable
|
|
465
663
|
security definer
|
|
466
664
|
set search_path = ''
|
|
467
665
|
as $$
|
|
468
|
-
select null
|
|
666
|
+
select null::${type} where false
|
|
469
667
|
$$;`).join("\n");
|
|
470
668
|
}
|
|
471
|
-
function rowSql(ctx,
|
|
472
|
-
const fn = qualified(ctx,
|
|
473
|
-
return `create or replace function ${fn}(p_row ${table}, p_permission text)
|
|
669
|
+
function rowSql(ctx, policy, node, table, branches) {
|
|
670
|
+
const fn = qualified(ctx, rowsHelper(node.name).replace(/_rows$/u, "_row"));
|
|
671
|
+
return `${memoRowSql(ctx, policy, fn, `p_row ${table}`, graphSqlName(node.name) ?? node.name, armsOf(branches), `permdock_candidates as (select (p_row).*)`) ?? `create or replace function ${fn}(p_row ${table}, p_permission text)
|
|
474
672
|
returns boolean
|
|
475
673
|
language sql
|
|
476
674
|
stable
|
|
477
675
|
security definer
|
|
676
|
+
${plannerOf(ctx)}
|
|
478
677
|
set search_path = ''
|
|
479
678
|
as $$
|
|
480
|
-
with
|
|
481
|
-
select exists (select 1 from
|
|
482
|
-
|
|
679
|
+
with permdock_candidates as (select (p_row).*)
|
|
680
|
+
select exists (select 1 from permdock_candidates where ${whereOf(branches)})
|
|
681
|
+
$$;`}
|
|
483
682
|
revoke execute on function ${fn}(${table}, text) from public, anon;
|
|
484
683
|
grant execute on function ${fn}(${table}, text) to authenticated;`;
|
|
485
684
|
}
|
|
486
|
-
function
|
|
685
|
+
function armsOf(branches) {
|
|
686
|
+
return [...branches.keys()].toSorted().flatMap((key) => {
|
|
687
|
+
const sql = permissionCase(key, branches.get(key) ?? [], void 0);
|
|
688
|
+
return sql === void 0 ? [] : [{
|
|
689
|
+
key,
|
|
690
|
+
sql
|
|
691
|
+
}];
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* `permitted_<resource>_row(p_id <type>, p_permission)`: the per-id form, which
|
|
696
|
+
* reads the one row by its key so a caller holding an id never builds a row.
|
|
697
|
+
*/
|
|
698
|
+
function rowByIdSql(ctx, policy, node, table, idType, branches) {
|
|
699
|
+
const fn = qualified(ctx, rowsHelper(node.name).replace(/_rows$/u, "_row"));
|
|
700
|
+
const id = quoteIdent(node.id);
|
|
701
|
+
const source = `${CANDIDATES} as materialized (select * from ${table} where ${id} = p_id)`;
|
|
702
|
+
return `${memoRowSql(ctx, policy, fn, `p_id ${idType}`, graphSqlName(node.name) ?? node.name, armsOf(branches), source) ?? `create or replace function ${fn}(p_id ${idType}, p_permission text)
|
|
703
|
+
returns boolean
|
|
704
|
+
language sql
|
|
705
|
+
stable
|
|
706
|
+
security definer
|
|
707
|
+
${plannerOf(ctx)}
|
|
708
|
+
set search_path = ''
|
|
709
|
+
as $$
|
|
710
|
+
with ${source}
|
|
711
|
+
select exists (select 1 from permdock_candidates where ${whereOf(branches)})
|
|
712
|
+
$$;`}
|
|
713
|
+
revoke execute on function ${fn}(${idType}, text) from public, anon;
|
|
714
|
+
grant execute on function ${fn}(${idType}, text) to authenticated;`;
|
|
715
|
+
}
|
|
716
|
+
function whereOf(branches, tenantFirst) {
|
|
487
717
|
const cases = [...branches.keys()].toSorted().flatMap((key) => {
|
|
488
|
-
const sql = permissionCase(key, branches.get(key) ?? []);
|
|
718
|
+
const sql = permissionCase(key, branches.get(key) ?? [], tenantFirst?.(key));
|
|
489
719
|
return sql === void 0 ? [] : [sql];
|
|
490
720
|
});
|
|
491
721
|
return cases.length === 0 ? "false" : `case p_permission\n${cases.join("\n")}\n else false\n end`;
|
|
492
722
|
}
|
|
493
|
-
function candidatesSql(fn, table, id, where) {
|
|
723
|
+
function candidatesSql(fn, table, id, idType, where) {
|
|
494
724
|
const assign = (indent) => `${indent}v_row.${id} := v_id;\n${indent}v_rows := pg_catalog.array_append(v_rows, v_row);`;
|
|
495
|
-
return `create or replace function ${fn}(p_permission text, p_ids
|
|
496
|
-
returns setof
|
|
725
|
+
return `create or replace function ${fn}(p_permission text, p_ids ${idType}[])
|
|
726
|
+
returns setof ${idType}
|
|
497
727
|
language plpgsql
|
|
498
728
|
stable
|
|
499
729
|
security definer
|
|
730
|
+
cost 1000
|
|
500
731
|
set search_path = ''
|
|
501
732
|
as $$
|
|
502
733
|
declare
|
|
503
734
|
v_row ${table};
|
|
504
735
|
v_rows ${table}[] := '{}';
|
|
505
|
-
v_id
|
|
736
|
+
v_id ${idType};
|
|
506
737
|
begin
|
|
507
738
|
begin
|
|
508
739
|
foreach v_id in array coalesce(p_ids, '{}') loop
|
|
@@ -522,39 +753,62 @@ ${assign(" ")}
|
|
|
522
753
|
with ${CANDIDATES} as materialized (
|
|
523
754
|
select * from ${table} where ${id} = any (array(select (r).${id} from pg_catalog.unnest(v_rows) r))
|
|
524
755
|
)
|
|
525
|
-
select ${id}
|
|
756
|
+
select ${id}::${idType} from ${CANDIDATES}
|
|
526
757
|
where ${where};
|
|
527
758
|
end
|
|
528
759
|
$$;
|
|
529
|
-
revoke execute on function ${fn}(text,
|
|
530
|
-
grant execute on function ${fn}(text,
|
|
760
|
+
revoke execute on function ${fn}(text, ${idType}[]) from public, anon;
|
|
761
|
+
grant execute on function ${fn}(text, ${idType}[]) to authenticated;`;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* For a key whose every allow is a role held at the root scope, the check that
|
|
765
|
+
* the row's tenant column is among the tenants where the caller holds the key.
|
|
766
|
+
* It sits first in the key's branch and its subquery does not depend on the
|
|
767
|
+
* row, so Postgres runs it once and the index on the column applies.
|
|
768
|
+
* `undefined` when the resource has no tenant column (a relation `memberOf` the
|
|
769
|
+
* root scope) or an allow reaches the key through a global role, a sub-scope or
|
|
770
|
+
* instance role, a relation, a link or an `anyone` grantee.
|
|
771
|
+
*/
|
|
772
|
+
function tenantFirstOf(ctx, policy, node) {
|
|
773
|
+
const root = rootScope(ctx.scopes);
|
|
774
|
+
if (root === void 0 || ctx.customRoles !== void 0 || [...policyLevels(policy, node.name)].length > 0) return;
|
|
775
|
+
const column = Object.values(node.relations).find((relation) => "field" in relation && relation.memberOf !== void 0 && resolveScope(ctx.scopes, relation.memberOf) === root);
|
|
776
|
+
if (column === void 0 || !("field" in column)) return;
|
|
777
|
+
const check = `${quoteIdent(column.field)} in (select ${qualified(ctx, permittedByPermissionHelper(root))}(p_permission, true))`;
|
|
778
|
+
return (key) => {
|
|
779
|
+
const allows = policy.grants.filter((grant) => grant.effect === "allow" && grant.permission.key === key);
|
|
780
|
+
return allows.length > 0 && allows.every((grant) => flattenGrantee(grant.to).length > 0 && flattenGrantee(grant.to).every((item) => item.kind === "role" && typeof item.scope === "string" && resolveScope(ctx.scopes, item.scope) === root)) ? check : void 0;
|
|
781
|
+
};
|
|
531
782
|
}
|
|
532
|
-
function resourceSql(ctx, node, branches, narrowed, tables) {
|
|
783
|
+
function resourceSql(ctx, policy, node, branches, narrowed, tables) {
|
|
533
784
|
const name = rowsHelper(node.name);
|
|
534
785
|
const fn = qualified(ctx, name);
|
|
535
786
|
const table = quoteQualified(tableFor(node.name, tables));
|
|
536
|
-
const
|
|
787
|
+
const idType = idTypeOf(ctx, node.name);
|
|
788
|
+
const where = whereOf(branches, tenantFirstOf(ctx, policy, node));
|
|
537
789
|
const near = whereOf(narrowed);
|
|
538
790
|
const rows = `-- ${node.name}: ids of the rows the caller may act on with p_permission, as the table's policies decide it
|
|
539
791
|
create or replace function ${fn}(p_permission text)
|
|
540
|
-
returns setof
|
|
792
|
+
returns setof ${idType}
|
|
541
793
|
language sql
|
|
542
794
|
stable
|
|
543
795
|
security definer
|
|
796
|
+
${plannerOf(ctx)}
|
|
544
797
|
set search_path = ''
|
|
545
798
|
as $$
|
|
546
|
-
select ${quoteIdent(node.id)}
|
|
799
|
+
select ${quoteIdent(node.id)}::${idType} from ${table}
|
|
547
800
|
where ${where}
|
|
548
801
|
$$;
|
|
549
802
|
revoke execute on function ${fn}(text) from public, anon;
|
|
550
803
|
grant execute on function ${fn}(text) to authenticated;
|
|
551
|
-
${candidatesSql(fn, table, quoteIdent(node.id), near)}
|
|
552
|
-
${rowSql(ctx,
|
|
804
|
+
${candidatesSql(fn, table, quoteIdent(node.id), idType, near)}
|
|
805
|
+
${rowSql(ctx, policy, node, table, narrowed)}
|
|
806
|
+
${rowByIdSql(ctx, policy, node, table, idType, narrowed)}`;
|
|
553
807
|
if (ctx.dialect === "neon") return rows;
|
|
554
808
|
return `${rows}
|
|
555
809
|
-- the same rows for a user the caller names, with claims it supplies; no client role may execute it
|
|
556
|
-
${forUserSql(ctx, qualified(ctx, `${name}_for`), fn, false)}
|
|
557
|
-
${forUserSql(ctx, qualified(ctx, `${name}_for`), fn, true)}`;
|
|
810
|
+
${forUserSql(ctx, qualified(ctx, `${name}_for`), fn, false, idType)}
|
|
811
|
+
${forUserSql(ctx, qualified(ctx, `${name}_for`), fn, true, idType)}`;
|
|
558
812
|
}
|
|
559
813
|
/**
|
|
560
814
|
* `permitted_<resource>_rows(p_permission)` for each resource `select` names
|
|
@@ -575,8 +829,10 @@ function rowHelpersSql(ctx, policy, branches, select, tables, warnings, narrowed
|
|
|
575
829
|
for (const name of names) {
|
|
576
830
|
const node = policy.resources.get(name);
|
|
577
831
|
if (node === void 0) throw configError(`PermDock CLI: rls.rowHelpers names '${name}', which the policy does not declare`);
|
|
578
|
-
chunks.push(resourceSql(ctx, node, rowBranchesOf(branches, name), rowBranchesOf(narrowed, name), tables));
|
|
832
|
+
chunks.push(resourceSql(ctx, policy, node, rowBranchesOf(branches, name), rowBranchesOf(narrowed, name), tables));
|
|
579
833
|
}
|
|
834
|
+
const triggers = names.length === 0 ? "" : memoRowTriggersSql(ctx, policy, tables);
|
|
835
|
+
if (triggers !== "") chunks.push(`-- a relation write changes what the row helpers' memo holds inside the statement\n${triggers}`);
|
|
580
836
|
if (chunks.length > 0 && ctx.dialect === "neon") warnings.push("rls.rowHelpers: the neon dialect reads the subject from auth.session(), which SQL cannot set, so no permitted_<resource>_rows_for is written");
|
|
581
837
|
return chunks.length === 0 ? "" : `${chunks.join("\n\n")}\n`;
|
|
582
838
|
}
|
|
@@ -724,6 +980,7 @@ function buildContext(input, policy, options) {
|
|
|
724
980
|
const tokenScopes = tokenScopesPlan(tokenScopesSetting, policy);
|
|
725
981
|
let vias;
|
|
726
982
|
try {
|
|
983
|
+
checkSharedTables(rls?.tables);
|
|
727
984
|
vias = resolveVias(rls?.tables, scopes, input.dialect);
|
|
728
985
|
} catch (cause) {
|
|
729
986
|
return { refusal: describeError(cause) };
|
|
@@ -746,6 +1003,8 @@ function buildContext(input, policy, options) {
|
|
|
746
1003
|
roleClaim: rls?.roleClaim ?? "user_role",
|
|
747
1004
|
tenantType: input.tenantType ?? firstScopeType(rls?.scopeTypes, scopes),
|
|
748
1005
|
...rls?.scopeTypes === void 0 ? {} : { scopeTypes: rls.scopeTypes },
|
|
1006
|
+
...rls?.idTypes === void 0 ? {} : { idTypes: rls.idTypes },
|
|
1007
|
+
...rls?.memo === "better-supabase" ? { memo: "better-supabase" } : {},
|
|
749
1008
|
...memberships === void 0 ? {} : { memberships },
|
|
750
1009
|
...sources === void 0 || sources.length === 0 ? {} : { sources },
|
|
751
1010
|
...memberSources === void 0 || memberSources.length === 0 ? {} : { memberSources },
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
3
3
|
import { a as ownRecord } from "./paths-CUvURzHp.js";
|
|
4
|
-
import { a as isId, r as idList } from "./expiry-6XByK0dm.js";
|
|
5
|
-
import { n as internalsOf } from "./internals-B3IgHrvo.js";
|
|
6
4
|
import { c as listPermissions, m as annotationsFor, n as findPermission } from "./permission-registry-B8tYxPIt.js";
|
|
7
5
|
import { g as secondsOf, l as isRfc3339, m as rfc3339, p as nowSeconds } from "./time-nR1JesoH.js";
|
|
6
|
+
import { r as isId, t as idList } from "./ids-DzhJaCUj.js";
|
|
8
7
|
import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
|
|
9
8
|
import { r as sha256Digest } from "./sha256-C-4WXKIu.js";
|
|
9
|
+
import { n as internalsOf } from "./internals-B3IgHrvo.js";
|
|
10
10
|
//#region src/core/support-session.ts
|
|
11
11
|
const DEFAULT_TTL = 3600;
|
|
12
12
|
const MAX_TTL = 86400;
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as requiredPlans } from "../errors-
|
|
2
|
-
import { i as describe } from "../describe-
|
|
1
|
+
import { c as requiredPlans } from "../errors-D_JIQJYb.js";
|
|
2
|
+
import { i as describe } from "../describe-DVobr5FX.js";
|
|
3
3
|
import { t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
4
|
-
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-
|
|
4
|
+
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-DSyjHD5-.js";
|
|
5
5
|
import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-L9UOwATg.js";
|
|
6
6
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
7
|
-
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-
|
|
8
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
7
|
+
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-CD1qmxdx.js";
|
|
8
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-C6-7TPTV.js";
|
|
9
9
|
import { Component } from "svelte";
|
|
10
10
|
//#region src/svelte/index.d.ts
|
|
11
11
|
export declare const Protected: Component<ProtectedProps>;
|
package/dist/svelte/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { n as describe } from "../describe-BZAlPHxT.js";
|
|
|
3
3
|
import { n as boundaryFallback, t as boundaryDigest } from "../boundary-BV3O1eud.js";
|
|
4
4
|
import { r as approvalHeaders } from "../protected-action-OpOxtTsN.js";
|
|
5
5
|
import { u as slotContent } from "../views-MWmJ6Y4P.js";
|
|
6
|
-
import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-
|
|
7
|
-
import { n as getUi, t as getStore } from "../context-
|
|
6
|
+
import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-CXv6BHH6.js";
|
|
7
|
+
import { n as getUi, t as getStore } from "../context-Cem4QafV.js";
|
|
8
8
|
import { n as viewFor, t as scopedFor } from "../runtime-rf0ZuyF3.js";
|
|
9
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
9
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-BuqAHjp_.js";
|
|
10
10
|
import "svelte/internal/disclose-version";
|
|
11
11
|
import * as $ from "svelte/internal/client";
|
|
12
12
|
import { onDestroy } from "svelte";
|
package/dist/svelte/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as DescribeMessages } from "../describe-
|
|
1
|
+
import { n as DescribeMessages } from "../describe-DVobr5FX.js";
|
|
2
2
|
import { n as boundaryDigest, r as boundaryFallback, t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
3
|
-
import { t as ClientStore } from "../store-
|
|
4
|
-
import { a as scopedFor, c as slotContent, i as ProtectedProps, o as viewFor, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-
|
|
3
|
+
import { t as ClientStore } from "../store-DSyjHD5-.js";
|
|
4
|
+
import { a as scopedFor, c as slotContent, i as ProtectedProps, o as viewFor, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-CD1qmxdx.js";
|
|
5
5
|
//#region src/svelte/context.d.ts
|
|
6
6
|
/** The provider's `defaults` and `messages`. */
|
|
7
7
|
type PermDockUi = {
|
package/dist/svelte/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as boundaryFallback, t as boundaryDigest } from "../boundary-BV3O1eud.js";
|
|
2
2
|
import { u as slotContent } from "../views-MWmJ6Y4P.js";
|
|
3
|
-
import { n as getUi, t as getStore } from "../context-
|
|
3
|
+
import { n as getUi, t as getStore } from "../context-Cem4QafV.js";
|
|
4
4
|
import { n as viewFor, t as scopedFor } from "../runtime-rf0ZuyF3.js";
|
|
5
5
|
export { boundaryDigest, boundaryFallback, getStore, getUi, scopedFor, slotContent, viewFor };
|
package/dist/svelte/source.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as requiredPlans } from "../errors-
|
|
2
|
-
import { i as describe } from "../describe-
|
|
1
|
+
import { c as requiredPlans } from "../errors-D_JIQJYb.js";
|
|
2
|
+
import { i as describe } from "../describe-DVobr5FX.js";
|
|
3
3
|
import { t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
4
|
-
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-
|
|
4
|
+
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-DSyjHD5-.js";
|
|
5
5
|
import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-L9UOwATg.js";
|
|
6
6
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
7
|
-
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-
|
|
8
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
7
|
+
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-CD1qmxdx.js";
|
|
8
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-C6-7TPTV.js";
|
|
9
9
|
import { Component } from "svelte";
|
|
10
10
|
//#region src/svelte/source.d.ts
|
|
11
11
|
export declare const Protected: Component<ProtectedProps>;
|
package/dist/svelte/source.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as requiredPlans } from "../problem-details-CLDgX1KV.js";
|
|
2
2
|
import { n as describe } from "../describe-BZAlPHxT.js";
|
|
3
3
|
import { r as approvalHeaders } from "../protected-action-OpOxtTsN.js";
|
|
4
|
-
import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-
|
|
5
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
4
|
+
import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-CXv6BHH6.js";
|
|
5
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-BuqAHjp_.js";
|
|
6
6
|
import PermissionBoundaryComponent from "./PermissionBoundary.svelte";
|
|
7
7
|
import ProtectedComponent from "./Protected.svelte";
|
|
8
8
|
//#region src/svelte/source.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as Policy, N as PolicyVocabulary, en as Snapshot, yr as Principal } from "../policy-types-
|
|
2
|
-
import {
|
|
3
|
-
import { a as OperationInput, t as Operation } from "../operations-
|
|
4
|
-
import { a as PermDock } from "../permdock-
|
|
5
|
-
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types
|
|
6
|
-
import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-
|
|
1
|
+
import { D as Policy, N as PolicyVocabulary, en as Snapshot, yr as Principal } from "../policy-types-rNfz7t0M.js";
|
|
2
|
+
import { w as Permission } from "../vocabulary-DeZvUaTw.js";
|
|
3
|
+
import { a as OperationInput, t as Operation } from "../operations-BMPx7HyO.js";
|
|
4
|
+
import { a as PermDock } from "../permdock-BaB-KQqn.js";
|
|
5
|
+
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types--_Hann81.js";
|
|
6
|
+
import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-DxqsIXSO.js";
|
|
7
7
|
import { RequestEvent } from "@sveltejs/kit";
|
|
8
8
|
//#region src/sveltekit/create.d.ts
|
|
9
9
|
/**
|
package/dist/sveltekit/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-
|
|
1
|
+
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-BzTDWO4m.js";
|
|
2
|
+
import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-MoYZ-vF5.js";
|
|
3
3
|
//#region src/sveltekit/create.ts
|
|
4
4
|
const route = {
|
|
5
5
|
context: (event) => event,
|