permdock 0.22.1 → 0.23.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 +4 -4
- package/dist/{adoption-scan-DzX5Gqcg.js → adoption-scan-CNoE5yBA.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 +2 -2
- package/dist/app/index.d.ts +6 -6
- package/dist/app/index.js +4 -4
- package/dist/{approval-normalize-DNLW0zOM.js → approval-normalize-KfhzpD93.js} +1 -1
- package/dist/{approval-policies-UnDSxT__.d.ts → approval-policies-D7moEfTM.d.ts} +1 -1
- package/dist/{approval-prompt-2hTqo6IM.d.ts → approval-prompt-DtfKSH-8.d.ts} +1 -1
- package/dist/approvals/index.d.ts +3 -3
- package/dist/approvals/index.js +3 -3
- package/dist/{approvals-B_sn4Wrn.js → approvals-BfzI8Foe.js} +5 -5
- package/dist/{arazzo-BkjyGVF0.js → arazzo-4rMFOHbu.js} +1 -1
- package/dist/{arazzo-CTx11zFc.js → arazzo-rsYPFgga.js} +2 -2
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +2 -2
- package/dist/{audience-5Xx1hdIv.js → audience-N2BqOvES.js} +1 -1
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +3 -3
- package/dist/{automation-B20_8UoT.d.ts → automation-CrGcfIZn.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-auth/index.js +1 -1
- package/dist/better-supabase/index.d.ts +35 -10
- package/dist/better-supabase/index.js +58 -15
- package/dist/{bind-B4Z0U2Gr.js → bind-Cx10JuJ-.js} +3 -3
- package/dist/{bind-CnOMjazH.d.ts → bind-N5jf6kjk.d.ts} +7 -7
- package/dist/{body-B3ylkmmE.js → body-Cy9S8zhw.js} +1 -1
- package/dist/{build-instance-B0vsViF5.js → build-instance-BDGzsGcn.js} +1 -1
- package/dist/{capability-YkRMUAsF.d.ts → capability-mLbd3KZ0.d.ts} +1 -1
- package/dist/{casbin-BFOuRptJ.js → casbin-CjUT-wqV.js} +1 -1
- package/dist/{casbin-BpS9ABSO.js → casbin-Dg5N0Gfa.js} +1 -1
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +5 -5
- package/dist/{catalog-Y4CjN8NA.js → catalog-BJu0A15r.js} +2 -2
- package/dist/{catalog-CoyKnU5c.js → catalog-CgA6-DQA.js} +1 -1
- package/dist/catalog-DqYnQz8U.js +1 -0
- package/dist/{catalog-doc-Zi0jRpyH.js → catalog-doc-BoSOQRXT.js} +2 -2
- package/dist/{challenge-B__LcNve.js → challenge-DVw1SrH9.js} +1 -1
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +3 -3
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +1 -1
- package/dist/clerk/index.d.ts +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +2 -2
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +2 -2
- package/dist/{cloud-DXcQXWDi.js → cloud-Blw4AaQv.js} +2 -2
- package/dist/{codemod-CxyKuniX.js → codemod-BFFXaS-S.js} +1 -1
- package/dist/{codemod-DJ0WqXWk.js → codemod-ByRUKVp-.js} +2 -2
- package/dist/{collect-ScSG05VJ.js → collect-COqPRz6O.js} +2 -2
- package/dist/collect-CjFczu8a.js +1 -0
- package/dist/{collect-Cr71JA7z.js → collect-D3ToPa6Z.js} +1 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-DC-BrhH1.d.ts → compile-DSwZUJmL.d.ts} +2 -2
- package/dist/{completion-BHVvAJ6Q.js → completion-BW53byZN.js} +1 -1
- package/dist/{config-2grt3oll.js → config-B0qti4jI.js} +1 -1
- package/dist/{config-report-Cg5Y5j0h.js → config-report-DgMqeeK6.js} +2 -2
- package/dist/{context-Cem4QafV.js → context-KrAhRY22.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +1 -1
- package/dist/{core-CUjhfz0W.js → core-DMQsq2Gv.js} +5 -5
- package/dist/{core-D2JNg5jA.d.ts → core-KsoqXWhf.d.ts} +2 -2
- package/dist/{create-BsL5lCWR.js → create-BRr7Gu7N.js} +6 -6
- package/dist/{create-oMCcZV4X.d.ts → create-ChK8bpCK.d.ts} +7 -7
- package/dist/{create-CPDSbK1a.d.ts → create-DGFv7Dje.d.ts} +4 -4
- package/dist/{create-BJ2_8NDO.js → create-bYkJ4-tg.js} +3 -3
- package/dist/{create-B2tdOygC.d.ts → create-goT32QIN.d.ts} +6 -6
- package/dist/{credential-Bap3HClV.js → credential-DrVrRL7z.js} +2 -2
- package/dist/{credentials-BXV0oz56.js → credentials-UwTE2wCW.js} +1 -1
- package/dist/{credentials-DPX140fN.d.ts → credentials-fqa_Xzzh.d.ts} +2 -2
- package/dist/{condition-evaluate-bVVRSdzq.js → delegation-CrdqnesZ.js} +123 -156
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-BXQkWU7d.d.ts → denied-text-BTMxIn5W.d.ts} +1 -1
- package/dist/{describe-DVobr5FX.d.ts → describe-CazEjtOH.d.ts} +1 -1
- package/dist/{diff-Jc_kbDz-.js → diff-BkuW_5dK.js} +1 -1
- package/dist/{diff-BR9JArxz.js → diff-DLcsCeVo.js} +3 -3
- package/dist/{doctor-iIbdUK8F.js → doctor-Jk2Ifezw.js} +2 -2
- package/dist/{doctor-DaRoSPT0.js → doctor-oD08zL1e.js} +37 -19
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-D_JIQJYb.d.ts → errors-CXxQwtbZ.d.ts} +1 -1
- package/dist/{evaluate-B5yZHmts.js → evaluate-_JdlbJ32.js} +11 -8
- package/dist/{evaluations-BzTDWO4m.js → evaluations-Bj5xw0EM.js} +3 -3
- package/dist/{evaluations-DQYfh4Jh.d.ts → evaluations-DcUW5VkX.d.ts} +3 -3
- package/dist/evaluator-BvRk9kiK.js +0 -0
- package/dist/evaluator-eager-DvmrpdZt.js +9 -0
- package/dist/evaluator-mHAoYEkk.js +2 -0
- 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 +3 -3
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +3 -3
- package/dist/{fetch-adapter-MoYZ-vF5.js → fetch-adapter-CAA3VJMX.js} +3 -3
- package/dist/{fetch-adapter-DxqsIXSO.d.ts → fetch-adapter-eQ-mdk8n.d.ts} +2 -2
- package/dist/{fields-CVyOk-f1.js → fields-B17OWcPx.js} +1 -1
- package/dist/fields-DlKwZYiy.js +26 -0
- package/dist/from-snapshot-CdGYjHUg.js +153 -0
- package/dist/{gen-Cw8goef4.js → gen-BwcwwLok.js} +3 -3
- package/dist/{gen-DFpWGJWF.js → gen-D4ulqsYR.js} +1 -1
- package/dist/grantee-OG4klcNr.js +110 -0
- package/dist/{grantee-match-8J2y60MF.js → grantee-match-CPQ9zV-H.js} +1 -1
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-DzBIfL1N.js → helpers-CO2hDpBU.js} +1 -1
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DXq1plaP.d.ts → hosted-BUCpV8-u.d.ts} +1 -1
- package/dist/{hosted-C5I2TSXm.js → hosted-cPDyrlsQ.js} +5 -4
- package/dist/{import-CvXswHDy.js → import-B2jgnNS0.js} +1 -1
- package/dist/{import-DDegvwDI.js → import-BsrnU4BF.js} +1 -1
- package/dist/{index-C-R8lBPb.d.ts → index-BXS29UnX.d.ts} +1 -1
- package/dist/{index-BcS8c_2S.d.ts → index-CvKGALWb.d.ts} +4 -4
- package/dist/{index-BdZpqhJK.d.ts → index-CxA-ygwc.d.ts} +2 -2
- package/dist/{index-Cjfa1Uwr.d.ts → index-DD2FBFdm.d.ts} +10 -8
- package/dist/{index-iIsqXFVu.d.ts → index-DQCBzEhO.d.ts} +4 -4
- package/dist/{index-C_8uxAlv.d.ts → index-DYAJ9JX1.d.ts} +4 -4
- package/dist/index.d.ts +16 -16
- package/dist/index.js +21 -18
- package/dist/{init-D_T_zgFg.js → init-Baq0yYfu.js} +1 -1
- package/dist/{init-Dz552ZPp.js → init-Cik6ITgM.js} +3 -3
- package/dist/{instance-options-C6gEDOts.d.ts → instance-options-BDHB3qBG.d.ts} +1 -1
- package/dist/{instance-snapshot-D_dGTq--.js → instance-snapshot-LPNBG9np.js} +67 -8
- package/dist/jwt/index.d.ts +4 -4
- package/dist/{kernel-NmxiWII2.js → kernel-BY3rVRs2.js} +8 -8
- package/dist/kysely/index.d.ts +3 -3
- package/dist/{login-DIVe6QdP.js → login-CUboKh0f.js} +3 -3
- package/dist/{login-B2usNw0X.js → login-CcBS1xkU.js} +1 -1
- package/dist/{manifest-D44OkoLk.js → manifest-BoCYBbQL.js} +1 -1
- package/dist/{manifest-CbHnl4I_.js → manifest-CIlVL-QT.js} +35 -35
- package/dist/{manifest-schema-DUheHWcp.js → manifest-schema-svAkgqMc.js} +1 -1
- package/dist/{map-error-p4ROJ_26.js → map-error-BCdb2Nrp.js} +2 -2
- package/dist/may-use-D0_wNcgB.js +126 -0
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +5 -5
- package/dist/membership-filter-CfLdP_F9.js +68 -0
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +10 -10
- package/dist/next/index.js +6 -6
- 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 +2 -2
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-5moP9sTG.js → openapi-DglIpD53.js} +2 -2
- package/dist/{openapi-DcvNnLFa.js → openapi-DobvXTF6.js} +2 -2
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +3 -3
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +1 -1
- package/dist/{output-RIUEs3_S.js → output-B81GJ6u6.js} +1 -1
- package/dist/{ownership-adPAsUwY.js → ownership-B7Ea-hUY.js} +3 -3
- package/dist/{parse-local-manifest-BaCqsqwC.d.ts → parse-local-manifest-DzZOzDsK.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +3 -3
- package/dist/{permdock-B5LyNVgn.js → permdock-HfTF99xX.js} +26 -15
- package/dist/{permdock-BaB-KQqn.d.ts → permdock-vD3mwLSm.d.ts} +3 -3
- package/dist/{permissions-COpRGKt7.js → permissions-CGYZqYsY.js} +2 -2
- package/dist/{policy-x8RBKW8d.d.ts → policy-B_cqFLHu.d.ts} +1 -1
- package/dist/{policy-wGzbAPQF.js → policy-BovcTojN.js} +5 -4
- package/dist/{policy-from-catalog-Cy103lsm.js → policy-from-catalog-lKL280I8.js} +7 -7
- package/dist/{policy-types-rNfz7t0M.d.ts → policy-types-CCBrL7me.d.ts} +14 -0
- package/dist/{postgrest-Cn0Res25.d.ts → postgrest-5WOO47Ud.d.ts} +2 -2
- package/dist/{powersync-C5_aFFaU.js → powersync-B6f4l8C1.js} +2 -2
- package/dist/{powersync-BUO5uQve.js → powersync-BUUqJfH2.js} +6 -6
- package/dist/powersync-D12Q6Chj.js +1 -0
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{protected-action-E7Sdt_Dt.js → protected-action-CdqR2-E2.js} +80 -12
- package/dist/{protected-action-C4aj1KjO.d.ts → protected-action-DGuJNiMA.d.ts} +20 -8
- package/dist/{provider-DKO9KHua.js → provider-6mpRZO1E.js} +21 -3
- package/dist/{provider-store-D4PU1my_.js → provider-store-BLd4UEmg.js} +4 -3
- package/dist/{provider-B-1DlOGM.d.ts → provider-yIM04TwN.d.ts} +1 -1
- package/dist/{pull-BkT7tTKb.js → pull-4Yi8zYeU.js} +3 -3
- package/dist/pull-Dr6Bq5Jo.js +1 -0
- package/dist/{push-CEPcWdTJ.js → push-Dv1nfFPr.js} +3 -3
- package/dist/{pushed-policy-P55cJNx5.d.ts → pushed-policy-B2ZSpnRY.d.ts} +1 -1
- package/dist/{pushed-policy-Bi5-il4C.js → pushed-policy-DJoyBZsd.js} +2 -2
- package/dist/react/index.d.ts +7 -7
- package/dist/react/index.js +4 -4
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +8 -8
- package/dist/react-native/index.js +7 -6
- package/dist/{replay-DKhFvt0L.d.ts → replay-CsErjiHt.d.ts} +1 -1
- package/dist/{request-context-5gl_oxO1.js → request-context-B_L4ev8L.js} +2 -2
- package/dist/resend/index.d.ts +4 -4
- package/dist/resend/index.js +2 -2
- package/dist/{resolve-names-bzYlAXRt.js → resolve-names-SGcLjtFc.js} +2 -2
- package/dist/{rls-v6V75yf_.js → rls-Df9NEWD3.js} +1 -1
- package/dist/{rls-DTf8X__h.js → rls-hmwRIS3-.js} +11 -11
- package/dist/{role-builder-boQiUvfo.js → role-builder-BXdhhQcB.js} +5 -3
- package/dist/row-pair-DglMdRFh.js +34 -0
- package/dist/{rpc-BqRiVpbP.d.ts → rpc-D3St8vPO.d.ts} +1 -1
- package/dist/{rpc-Dhi55Whd.js → rpc-DFtputZ1.js} +1 -1
- package/dist/{run-CgSQS9RF.js → run-BXmJIjRA.js} +2 -2
- package/dist/run-DnzrDgU-.js +1 -0
- package/dist/{run-ticket-Dulj4RQk.d.ts → run-ticket-zfABczfh.d.ts} +2 -2
- package/dist/{saas-DABv6vjy.js → saas-DIThcxbn.js} +5 -5
- package/dist/{scan-BY3Pp1PS.js → scan-BrTSlc_5.js} +1 -1
- package/dist/{schema-B_HsJKm2.js → schema-UOeI_LTB.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +5 -5
- package/dist/{server-types--_Hann81.d.ts → server-types-CtJSDhOv.d.ts} +8 -8
- package/dist/{sink-Cs6z34AX.d.ts → sink-BskpqwLl.d.ts} +2 -2
- package/dist/{skills-Bj2wk38p.js → skills-BTVeFptV.js} +1 -1
- package/dist/{skills-Clo4qYLn.js → skills-CAgWKbDR.js} +1 -1
- package/dist/{snapshot-C2j96x97.js → snapshot-BcHYtUIg.js} +57 -7
- package/dist/{snapshot-cache-Cc7VNabe.d.ts → snapshot-cache-BnXMcJbK.d.ts} +1 -1
- package/dist/snapshot-empty-BoPBFoB8.js +17 -0
- package/dist/snapshot-evaluate-CwYVSUgO.js +501 -0
- package/dist/snapshot-reads-DOsTYC82.js +66 -0
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid/index.js +2 -2
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-CdYZBVcW.d.ts → sources-DhCtO9G8.d.ts} +1 -1
- package/dist/{src-BG9YJM3Q.js → src-BZKQe1lr.js} +13 -12
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +2 -2
- package/dist/{standard-webhooks-CJBgfl7y.d.ts → standard-webhooks-kQDkIPj3.d.ts} +2 -2
- package/dist/{store-BpKH-pLm.js → store-DXO0aVgf.js} +2 -2
- package/dist/{store-DSyjHD5-.d.ts → store-core-CDabEiO9.d.ts} +27 -6
- package/dist/{store-options-CXv6BHH6.js → store-options-COLWAd1K.js} +92 -12
- package/dist/{stores-BuqAHjp_.js → stores-DYxx75fk.js} +1 -1
- package/dist/{stores-C6-7TPTV.d.ts → stores-Mw_VAJ3B.d.ts} +5 -5
- package/dist/{subject-cache-d_Z4KAnm.d.ts → subject-cache-DrJGnRiV.d.ts} +1 -1
- package/dist/supabase/index.d.ts +6 -6
- package/dist/supabase/index.js +2 -2
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +5 -5
- package/dist/{supabase-DnazO6W4.js → supabase-BDr-fIHp.js} +1 -1
- package/dist/{supabase-CJv6K3iz.js → supabase-Bt8rb-ah.js} +2 -2
- package/dist/{supabase-hook-DLQMugW8.js → supabase-hook-Cb3UZpGC.js} +6 -5
- package/dist/supabase-hook-D1pwHu87.js +1 -0
- package/dist/{supautils-BHKsP7l-.js → supautils-CuR9rPsi.js} +8 -8
- 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 +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-CbEOy2Ma.js → tables-Bl_ozD0k.js} +35 -13
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +2 -2
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +3 -3
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +3 -3
- package/dist/testing/fixtures/index.js +7 -1
- package/dist/testing/index.d.ts +23 -23
- package/dist/testing/index.js +47 -41
- 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 +3 -3
- package/dist/{type-helpers-iXJEIDe7.d.ts → type-helpers-fQdBvtU0.d.ts} +1 -1
- package/dist/{types-BpxdxaRD.d.ts → types-BSGrzDPi.d.ts} +4 -4
- package/dist/{types-ZfjQB0KC.d.ts → types-CAp7UGiB.d.ts} +1 -1
- package/dist/{types-CD1qmxdx.d.ts → types-CErg7ft6.d.ts} +3 -3
- package/dist/{types-_pi9kxS2.d.ts → types-CXUwgZ3d.d.ts} +2 -2
- package/dist/{types-C_a44wSr.d.ts → types-Cc68_zqR.d.ts} +2 -2
- package/dist/{types-Cq2rvv-C.d.ts → types-CdXM6qPc.d.ts} +2 -2
- package/dist/{types-BSNZMp5b.d.ts → types-ChYCRn7Y.d.ts} +1 -1
- package/dist/{types-CuDXvyIT.d.ts → types-DDlaFDM3.d.ts} +4 -4
- package/dist/{types-NikV1pND.d.ts → types-DM0o1YyJ.d.ts} +4 -4
- package/dist/{types-B9F0EZAF.d.ts → types-DyA4Loy4.d.ts} +3 -3
- package/dist/{types-cNZhj0UF.d.ts → types-JmB6unT6.d.ts} +1 -1
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-DlOllyPi.js → usage-B6sQwycY.js} +4 -4
- package/dist/{usage-BUUXeKwk.js → usage-CNkKk27O.js} +1 -1
- package/dist/usage-Cem1FOeJ.js +1 -0
- package/dist/{validation-error-DLAYFlkr.d.ts → validation-error-BE8bpmhR.d.ts} +1 -1
- package/dist/{validity-Buc7w8E9.js → validity-IcjQSR7I.js} +1 -26
- package/dist/{verify-CfmvQjVw.js → verify-OtU4yCzg.js} +11 -11
- package/dist/{version-sources-BC3hf2ME.js → version-sources-BZ7V6Z8Z.js} +1 -1
- package/dist/{grantee-Dke-9rd1.js → vocabulary-BuYFWeCU.js} +1 -107
- package/dist/vue/index.d.ts +5 -5
- package/dist/vue/index.js +2 -2
- package/dist/{waiter-cbK1CBhT.d.ts → waiter-LdnPaBJE.d.ts} +2 -2
- package/dist/watch-B8F7Wgdy.js +1 -0
- package/dist/{watch-BigZ260i.js → watch-CR2ZIT_5.js} +1 -1
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/{who-can-CjfMP9a4.js → who-can-DcrHB6ya.js} +2 -2
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +2 -2
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-B-k2qHJx.d.ts → wrap-CVBPIuEs.d.ts} +2 -2
- package/package.json +1 -1
- package/schemas/supabase-manifest-v1.json +1 -1
- package/skills/permdock-wire/references/adapters.md +2 -0
- package/dist/catalog-C462QC3A.js +0 -1
- package/dist/collect-W9i7REKT.js +0 -1
- package/dist/from-snapshot-oR_N97dM.js +0 -927
- package/dist/powersync-DhspazC8.js +0 -1
- package/dist/pull-COPm1W-l.js +0 -1
- package/dist/run-ItR_bQGz.js +0 -1
- package/dist/supabase-hook-vZADjjfN.js +0 -1
- package/dist/usage-NmH5QXKC.js +0 -1
- package/dist/watch-CHURMgrv.js +0 -1
- package/dist/{connection-QFsv-kbh.js → connection-zoAgwdsD.js} +1 -1
- package/dist/{problem-BWP1l86g.js → problem-CPB8kqk7.js} +1 -1
- package/dist/{wrap-BKU5Arsu.js → wrap-C5PWzgkq.js} +1 -1
package/dist/eve/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { r as withApp } from "../app-DIvM65Mv.js";
|
|
3
3
|
import { c as isApprovalError } from "../types-CcUXciSj.js";
|
|
4
|
-
import { o as resolveApproval } from "../helpers-
|
|
5
|
-
import { t as agentRuntime } from "../create-
|
|
4
|
+
import { o as resolveApproval } from "../helpers-CO2hDpBU.js";
|
|
5
|
+
import { t as agentRuntime } from "../create-bYkJ4-tg.js";
|
|
6
6
|
import { t as boundedMap } from "../lru-8q4WZjBV.js";
|
|
7
7
|
//#region src/eve/create.ts
|
|
8
8
|
const TOKENS_PER_PROCESS = 1e3;
|
package/dist/express/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-
|
|
1
|
+
import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-CCBrL7me.js";
|
|
2
2
|
import { w as Permission } from "../vocabulary-DeZvUaTw.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
4
|
-
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types
|
|
5
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
3
|
+
import { a as PermDock } from "../permdock-vD3mwLSm.js";
|
|
4
|
+
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CtJSDhOv.js";
|
|
5
|
+
import { t as ServerAdapterOptions } from "../bind-N5jf6kjk.js";
|
|
6
6
|
import { i as toRequest, r as sendResponse } from "../http-B_LphE5Y.js";
|
|
7
7
|
import { ErrorRequestHandler, Request, RequestHandler, Response, Router } from "express";
|
|
8
8
|
//#region src/express/create.d.ts
|
package/dist/express/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-
|
|
1
|
+
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-Bj5xw0EM.js";
|
|
2
2
|
import { r as hasCredentials } from "../http-DKLXrFGk.js";
|
|
3
|
-
import { i as decorate, r as bindKernel } from "../bind-
|
|
4
|
-
import { t as problemFromError } from "../map-error-
|
|
3
|
+
import { i as decorate, r as bindKernel } from "../bind-Cx10JuJ-.js";
|
|
4
|
+
import { t as problemFromError } from "../map-error-BCdb2Nrp.js";
|
|
5
5
|
import { n as sendResponse, r as toRequest } from "../http-DH94eh6f.js";
|
|
6
6
|
import express from "express";
|
|
7
7
|
//#region src/express/create.ts
|
package/dist/fastify/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-
|
|
1
|
+
import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-CCBrL7me.js";
|
|
2
2
|
import { w as Permission } from "../vocabulary-DeZvUaTw.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
4
|
-
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types
|
|
5
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
3
|
+
import { a as PermDock } from "../permdock-vD3mwLSm.js";
|
|
4
|
+
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CtJSDhOv.js";
|
|
5
|
+
import { t as ServerAdapterOptions } from "../bind-N5jf6kjk.js";
|
|
6
6
|
import { FastifyPluginAsync, FastifyReply, FastifyRequest, FastifySchema, FastifyTypeProvider, FastifyTypeProviderDefault, RawRequestDefaultExpression, RawServerDefault, RouteGenericInterface } from "fastify";
|
|
7
7
|
//#region src/server/http.d.ts
|
|
8
8
|
/** A Fastify-style reply: `code`, `header` and `send`. */
|
package/dist/fastify/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-
|
|
1
|
+
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-Bj5xw0EM.js";
|
|
2
2
|
import { c as writeReply, i as headersFrom, n as firstHeader, r as hasCredentials, t as fetchRequest } from "../http-DKLXrFGk.js";
|
|
3
|
-
import { i as decorate, r as bindKernel } from "../bind-
|
|
4
|
-
import { t as problemFromError } from "../map-error-
|
|
3
|
+
import { i as decorate, r as bindKernel } from "../bind-Cx10JuJ-.js";
|
|
4
|
+
import { t as problemFromError } from "../map-error-BCdb2Nrp.js";
|
|
5
5
|
//#region src/fastify/http.ts
|
|
6
6
|
function toRequest(request) {
|
|
7
7
|
const host = firstHeader(request.headers.host) ?? "localhost";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { o as isPermission } from "./permission-registry-B8tYxPIt.js";
|
|
3
|
-
import { o as methodNotAllowed } from "./problem-
|
|
3
|
+
import { o as methodNotAllowed } from "./problem-CPB8kqk7.js";
|
|
4
4
|
import { r as hasCredentials } from "./http-DKLXrFGk.js";
|
|
5
|
-
import { i as decorate, r as bindKernel } from "./bind-
|
|
6
|
-
import { t as problemFromError } from "./map-error-
|
|
5
|
+
import { i as decorate, r as bindKernel } from "./bind-Cx10JuJ-.js";
|
|
6
|
+
import { t as problemFromError } from "./map-error-BCdb2Nrp.js";
|
|
7
7
|
//#region src/server/fetch-adapter.ts
|
|
8
8
|
/**
|
|
9
9
|
* `protect(target, data, options)(handler)` for a framework whose routes are
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { w as Permission } from "./vocabulary-DeZvUaTw.js";
|
|
2
2
|
import { a as OperationInput, t as Operation } from "./operations-BMPx7HyO.js";
|
|
3
3
|
import { n as RevocationFeed } from "./revocations-BaUXHM1N.js";
|
|
4
|
-
import { o as ProtectOptions } from "./server-types
|
|
5
|
-
import { t as ServerAdapterOptions } from "./bind-
|
|
4
|
+
import { o as ProtectOptions } from "./server-types-CtJSDhOv.js";
|
|
5
|
+
import { t as ServerAdapterOptions } from "./bind-N5jf6kjk.js";
|
|
6
6
|
//#region src/server/fetch-adapter.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* What `protect` checks: a permission, an operation from `defineOperations`, or
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as sole } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { i as configError } from "./errors-BhRkoNS7.js";
|
|
3
|
-
import { c as jsonSchemaOf } from "./catalog-doc-
|
|
3
|
+
import { c as jsonSchemaOf } from "./catalog-doc-BoSOQRXT.js";
|
|
4
4
|
import { A as quoteQualified, D as qualified, E as helperSchema, O as quoteIdent, _ as subjectClaimJsonSql, k as quoteLiteral, s as signedIn } from "./shared-DfaIWvIJ.js";
|
|
5
5
|
//#region src/cli/sql/clauses.ts
|
|
6
6
|
/**
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
2
|
+
import { i as ownKeys, n as isForbiddenKey, r as ownGet } from "./paths-CUvURzHp.js";
|
|
3
|
+
//#region src/core/fields.ts
|
|
4
|
+
function sanitizeFields(fields) {
|
|
5
|
+
if (fields === void 0) return;
|
|
6
|
+
return fields.filter((field) => field.length > 0 && !isForbiddenKey(field));
|
|
7
|
+
}
|
|
8
|
+
function grantCoversField(fields, field, effect) {
|
|
9
|
+
if (fields === void 0) return true;
|
|
10
|
+
if (fields.length === 0) return false;
|
|
11
|
+
if (field === void 0) return effect === "allow";
|
|
12
|
+
return fields.includes(field);
|
|
13
|
+
}
|
|
14
|
+
function pickVisible(row, canField) {
|
|
15
|
+
const out = {};
|
|
16
|
+
for (const key of ownKeys(row)) if (canField(key)) out[key] = ownGet(row, key);
|
|
17
|
+
return freezeDeep(out);
|
|
18
|
+
}
|
|
19
|
+
function sanitizeContext(value) {
|
|
20
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return {};
|
|
21
|
+
const out = {};
|
|
22
|
+
for (const key of ownKeys(value)) out[key] = ownGet(value, key);
|
|
23
|
+
return out;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { sanitizeFields as i, pickVisible as n, sanitizeContext as r, grantCoversField as t };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
+
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
3
|
+
import { c as listPermissions } from "./permission-registry-B8tYxPIt.js";
|
|
4
|
+
import { d as scopeList, o as normalizeMemberships } from "./scopes-gdH__vDZ.js";
|
|
5
|
+
import { n as pickVisible } from "./fields-DlKwZYiy.js";
|
|
6
|
+
import { n as rowIdOf } from "./row-pair-DglMdRFh.js";
|
|
7
|
+
import { o as subjectFromSnapshot } from "./snapshot-BcHYtUIg.js";
|
|
8
|
+
import { n as whereFromSnapshot, t as evaluateSnapshot } from "./snapshot-evaluate-CwYVSUgO.js";
|
|
9
|
+
import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "./errors-ynga1EQy.js";
|
|
10
|
+
import { n as signSnapshot } from "./membership-filter-CfLdP_F9.js";
|
|
11
|
+
import { i as decideAllWith, n as canAllWith } from "./checks-fyDOhcz0.js";
|
|
12
|
+
import { a as deniedFor, n as mayUse, r as permittedIds } from "./may-use-D0_wNcgB.js";
|
|
13
|
+
import { t as snapshotReads } from "./snapshot-reads-DOsTYC82.js";
|
|
14
|
+
//#region src/core/from-snapshot.ts
|
|
15
|
+
function resourceRef(snapshot, permission, data) {
|
|
16
|
+
const id = permission.kind === "collection" ? void 0 : rowIdOf(data, snapshot.ids?.[permission.resource]);
|
|
17
|
+
return id === void 0 || id === "*" ? { type: permission.resource } : {
|
|
18
|
+
type: permission.resource,
|
|
19
|
+
id
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function fromSnapshot(snapshot, options = {}) {
|
|
23
|
+
const subject = subjectFromSnapshot(snapshot, options.tenant);
|
|
24
|
+
const team = options.team;
|
|
25
|
+
const run = (permission, data, decideOptions = {}) => evaluateSnapshot(snapshot, subject, permission, data, team, decideOptions);
|
|
26
|
+
const decide = ((permission, data, decideOptions = {}) => run(permission, data, decideOptions));
|
|
27
|
+
const can = ((permission, data, decideOptions) => {
|
|
28
|
+
try {
|
|
29
|
+
return evaluateSnapshot(snapshot, subject, permission, data, team, decideOptions ?? {}, true).outcome === "granted";
|
|
30
|
+
} catch {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const assert = ((permission, data, decideOptions) => {
|
|
35
|
+
const decision = run(permission, data, decideOptions);
|
|
36
|
+
if (decision.outcome === "granted") return decision;
|
|
37
|
+
if (decision.outcome === "approval-required") throw new PermDockApprovalRequiredError({
|
|
38
|
+
decision,
|
|
39
|
+
permission: permission.key,
|
|
40
|
+
scope: permission.scope,
|
|
41
|
+
resource: resourceRef(snapshot, permission, data),
|
|
42
|
+
message: approvalMessage(permission.key, decision.reason, decision.token)
|
|
43
|
+
});
|
|
44
|
+
throw new PermDockDeniedError({
|
|
45
|
+
decision,
|
|
46
|
+
permission: permission.key,
|
|
47
|
+
scope: permission.scope,
|
|
48
|
+
resource: resourceRef(snapshot, permission, data),
|
|
49
|
+
subject,
|
|
50
|
+
message: deniedMessage(permission.key, subject.principal?.id, decision.denials, [])
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
const explain = ((permission, data, decideOptions) => run(permission, data, {
|
|
54
|
+
...decideOptions,
|
|
55
|
+
call: decideOptions?.call ?? "explain",
|
|
56
|
+
explain: true
|
|
57
|
+
}));
|
|
58
|
+
const instance = {
|
|
59
|
+
...snapshotReads(snapshot, subject),
|
|
60
|
+
can,
|
|
61
|
+
decide,
|
|
62
|
+
canAll: (checks, decideOptions) => canAllWith(can, checks, decideOptions),
|
|
63
|
+
decideAll: (checks, decideOptions) => decideAllWith(decide, checks, decideOptions),
|
|
64
|
+
decideEach(permission, rows, decideOptions) {
|
|
65
|
+
return Object.freeze(rows.map((row) => run(permission, row, decideOptions)));
|
|
66
|
+
},
|
|
67
|
+
decideIds(permission, ids) {
|
|
68
|
+
return Promise.resolve(Object.freeze(ids.map(() => deniedFor(permission, "unsupported"))));
|
|
69
|
+
},
|
|
70
|
+
decideFor(_principalId, permission) {
|
|
71
|
+
return Promise.resolve(deniedFor(permission, "unsupported"));
|
|
72
|
+
},
|
|
73
|
+
assert,
|
|
74
|
+
explain,
|
|
75
|
+
permissions: {},
|
|
76
|
+
roles: snapshot.vocabulary?.roles ?? {},
|
|
77
|
+
plans: snapshot.vocabulary?.plans ?? {},
|
|
78
|
+
filter(permission, rows, decideOptions) {
|
|
79
|
+
return rows.filter((row) => can(permission, row, decideOptions) === true);
|
|
80
|
+
},
|
|
81
|
+
pick(permission, row, decideOptions) {
|
|
82
|
+
if (row === null || typeof row !== "object") return {};
|
|
83
|
+
if (can(permission, row, decideOptions) !== true) return {};
|
|
84
|
+
return pickVisible(row, (field) => {
|
|
85
|
+
const next = compact({
|
|
86
|
+
...decideOptions,
|
|
87
|
+
field
|
|
88
|
+
});
|
|
89
|
+
return can(permission, row, next) === true;
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
where(permission) {
|
|
93
|
+
return whereFromSnapshot(snapshot, subject, permission, team);
|
|
94
|
+
},
|
|
95
|
+
actions(resource, data, decideOptions) {
|
|
96
|
+
return listPermissions(resource).filter((item) => run(item, data, decideOptions).outcome === "granted");
|
|
97
|
+
},
|
|
98
|
+
simulate: ((input, simulateOptions) => {
|
|
99
|
+
if (Array.isArray(input)) return input.map(([permission, data]) => run(permission, data, compact({ now: simulateOptions?.now })));
|
|
100
|
+
const preview = input;
|
|
101
|
+
const previewRoles = preview.roles?.map((item) => typeof item === "string" ? item : item.key);
|
|
102
|
+
const { typeLevel: _real, ...rest } = snapshot;
|
|
103
|
+
return fromSnapshot(freezeDeep({
|
|
104
|
+
...rest,
|
|
105
|
+
simulated: true,
|
|
106
|
+
subject: {
|
|
107
|
+
...snapshot.subject,
|
|
108
|
+
principal: snapshot.subject.principal === null ? null : compact({
|
|
109
|
+
...snapshot.subject.principal,
|
|
110
|
+
roles: previewRoles ?? snapshot.subject.principal.roles,
|
|
111
|
+
memberships: preview.memberships === void 0 ? snapshot.subject.principal.memberships : normalizeMemberships(preview.memberships, scopeList(snapshot.scopes)),
|
|
112
|
+
tenant: preview.tenant ?? snapshot.subject.principal.tenant
|
|
113
|
+
})
|
|
114
|
+
}
|
|
115
|
+
}), options);
|
|
116
|
+
}),
|
|
117
|
+
snapshot: ((signing) => signing?.signer === void 0 ? snapshot : signSnapshot(snapshot, signing.signer, compact({ audience: signing.audience }))),
|
|
118
|
+
on() {
|
|
119
|
+
return () => void 0;
|
|
120
|
+
},
|
|
121
|
+
tenant(id) {
|
|
122
|
+
return fromSnapshot(snapshot, compact({
|
|
123
|
+
tenant: id,
|
|
124
|
+
team
|
|
125
|
+
}));
|
|
126
|
+
},
|
|
127
|
+
team(id) {
|
|
128
|
+
return fromSnapshot(snapshot, compact({
|
|
129
|
+
tenant: options.tenant,
|
|
130
|
+
team: id
|
|
131
|
+
}));
|
|
132
|
+
},
|
|
133
|
+
grantedPermissions() {
|
|
134
|
+
return [];
|
|
135
|
+
},
|
|
136
|
+
prefetchRelations() {
|
|
137
|
+
return Promise.resolve();
|
|
138
|
+
},
|
|
139
|
+
mayUse(permission) {
|
|
140
|
+
return mayUse(instance, permission);
|
|
141
|
+
},
|
|
142
|
+
permittedIds(permission, scope, query) {
|
|
143
|
+
return permittedIds(instance, permission, scope, query);
|
|
144
|
+
},
|
|
145
|
+
derive() {
|
|
146
|
+
return Promise.resolve(instance);
|
|
147
|
+
},
|
|
148
|
+
subject
|
|
149
|
+
};
|
|
150
|
+
return Object.freeze(instance);
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { fromSnapshot as t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { t as DESCRIBE_TITLES } from "./describe-BZAlPHxT.js";
|
|
3
3
|
import { c as listPermissions } from "./permission-registry-B8tYxPIt.js";
|
|
4
|
-
import {
|
|
4
|
+
import { s as listRoles } from "./vocabulary-BuYFWeCU.js";
|
|
5
5
|
import { d as scopeList } from "./scopes-gdH__vDZ.js";
|
|
6
6
|
import { t as byCodePoint } from "./compare-DTfyUunF.js";
|
|
7
7
|
import { i as configError, n as CliError } from "./errors-BhRkoNS7.js";
|
|
8
|
-
import { c as jsonSchemaOf } from "./catalog-doc-
|
|
8
|
+
import { c as jsonSchemaOf } from "./catalog-doc-BoSOQRXT.js";
|
|
9
9
|
import { c as requirePolicy } from "./load-C4p4VgwR.js";
|
|
10
10
|
import { t as loadConfiguredOperations } from "./catalog-operations-Do1eD-Rt.js";
|
|
11
11
|
import { n as fileSummary, r as planFiles } from "./files-CfiRtQ-m.js";
|
|
12
12
|
import { f as writeOutputFiles, r as driftOf } from "./output-files-CM0BnH05.js";
|
|
13
|
-
import { t as resolveNames } from "./resolve-names-
|
|
13
|
+
import { t as resolveNames } from "./resolve-names-SGcLjtFc.js";
|
|
14
14
|
import { i as schemaExpression } from "./generate-CezbCaTI.js";
|
|
15
15
|
import { existsSync, readFileSync } from "node:fs";
|
|
16
16
|
import { dirname, extname, relative, resolve } from "node:path";
|
|
@@ -41,7 +41,7 @@ const gen = defineLeaf({
|
|
|
41
41
|
const out = given(flags.out);
|
|
42
42
|
const outDir = given(flags["out-dir"]);
|
|
43
43
|
const from = given(flags.policy);
|
|
44
|
-
const { runGen } = await import("./gen-
|
|
44
|
+
const { runGen } = await import("./gen-BwcwwLok.js");
|
|
45
45
|
return runGen({
|
|
46
46
|
cwd: ctx.cwd,
|
|
47
47
|
config: ctx.config,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
+
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
3
|
+
import { c as listPermissions, o as isPermission } from "./permission-registry-B8tYxPIt.js";
|
|
4
|
+
import { a as isRole, i as isPlan } from "./vocabulary-BuYFWeCU.js";
|
|
5
|
+
function isGrantee(value) {
|
|
6
|
+
return value !== null && typeof value === "object" && "kind" in value && typeof value.kind === "string";
|
|
7
|
+
}
|
|
8
|
+
function anyone() {
|
|
9
|
+
return freezeDeep({ kind: "anyone" });
|
|
10
|
+
}
|
|
11
|
+
function authenticated() {
|
|
12
|
+
return freezeDeep({ kind: "authenticated" });
|
|
13
|
+
}
|
|
14
|
+
function relation(resource, name, options) {
|
|
15
|
+
const resourceName = listPermissions(resource)[0]?.resource;
|
|
16
|
+
if (resourceName === void 0) throw new Error("PermDock: relation() requires a resource tree");
|
|
17
|
+
const through = options?.through;
|
|
18
|
+
if (Array.isArray(through)) {
|
|
19
|
+
if (through.length === 0) throw new Error("PermDock: relation() through needs at least one link");
|
|
20
|
+
for (const link of through) if (typeof link !== "string" || link === "" || link === "parent") throw new Error("PermDock: relation() through lists link names; walk parents with through: 'parent' or depth");
|
|
21
|
+
} else if (through !== void 0 && through !== "parent") throw new Error(`PermDock: relation() through must be 'parent' or a list of link names (got '${String(through)}')`);
|
|
22
|
+
const depth = options?.depth;
|
|
23
|
+
if (depth !== void 0) {
|
|
24
|
+
if (through === void 0) throw new Error("PermDock: relation() depth needs through: 'parent' or a link list");
|
|
25
|
+
const hops = Array.isArray(through) ? through.length : 0;
|
|
26
|
+
if (!Number.isInteger(depth) || depth < 0 || depth + hops > 32) throw new Error(`PermDock: relation() depth must be an integer from 0 to 32, counting each link`);
|
|
27
|
+
}
|
|
28
|
+
return freezeDeep(compact({
|
|
29
|
+
kind: "relation",
|
|
30
|
+
resource: resourceName,
|
|
31
|
+
relation: name,
|
|
32
|
+
through: through === void 0 || through === "parent" ? through : [...through],
|
|
33
|
+
depth
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
function inherit(permission, options) {
|
|
37
|
+
if (!isPermission(permission) || permission.kind === "collection") throw new Error("PermDock: inherit() takes an instance permission leaf");
|
|
38
|
+
const through = options.through;
|
|
39
|
+
const links = Array.isArray(through) ? through : void 0;
|
|
40
|
+
if (through !== "parent" && (links === void 0 || links.length === 0 || !links.every((link) => typeof link === "string" && link !== "" && link !== "parent"))) throw new Error("PermDock: inherit() through must be 'parent' or a non-empty list of link names");
|
|
41
|
+
return freezeDeep({
|
|
42
|
+
kind: "inherit",
|
|
43
|
+
permission: permission.key,
|
|
44
|
+
resource: permission.resource,
|
|
45
|
+
through: links === void 0 ? "parent" : links.map(String)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function plan(name) {
|
|
49
|
+
return freezeDeep({
|
|
50
|
+
kind: "plan",
|
|
51
|
+
plan: typeof name === "string" ? name : name.key
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function actor(kind) {
|
|
55
|
+
return freezeDeep({
|
|
56
|
+
kind: "actor",
|
|
57
|
+
actor: kind
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function assurance(options) {
|
|
61
|
+
const acr = options.acr === void 0 ? void 0 : typeof options.acr === "string" ? [options.acr] : options.acr;
|
|
62
|
+
const amr = options.amr === void 0 ? void 0 : typeof options.amr === "string" ? [options.amr] : options.amr;
|
|
63
|
+
return freezeDeep(compact({
|
|
64
|
+
kind: "assurance",
|
|
65
|
+
acr,
|
|
66
|
+
amr,
|
|
67
|
+
maxAge: options.maxAge
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
function resolveRoleScope(on) {
|
|
71
|
+
return typeof on === "string" ? on : "global";
|
|
72
|
+
}
|
|
73
|
+
function asGrantee(input) {
|
|
74
|
+
if (Array.isArray(input)) {
|
|
75
|
+
const items = [];
|
|
76
|
+
for (const item of input) items.push(...flattenGrantee(asGrantee(item)));
|
|
77
|
+
return items;
|
|
78
|
+
}
|
|
79
|
+
if (typeof input === "string") return freezeDeep({
|
|
80
|
+
kind: "role",
|
|
81
|
+
role: input,
|
|
82
|
+
scope: "global"
|
|
83
|
+
});
|
|
84
|
+
if (isRole(input)) return freezeDeep({
|
|
85
|
+
kind: "role",
|
|
86
|
+
role: input.key,
|
|
87
|
+
scope: resolveRoleScope(input.on)
|
|
88
|
+
});
|
|
89
|
+
if (isPlan(input)) return freezeDeep({
|
|
90
|
+
kind: "plan",
|
|
91
|
+
plan: input.key
|
|
92
|
+
});
|
|
93
|
+
if (isGrantee(input)) return input;
|
|
94
|
+
throw new Error("PermDock: invalid grantee");
|
|
95
|
+
}
|
|
96
|
+
function flattenGrantee(input) {
|
|
97
|
+
if (input === void 0) return [];
|
|
98
|
+
if (Array.isArray(input)) return input;
|
|
99
|
+
return [input];
|
|
100
|
+
}
|
|
101
|
+
function roleNameOf(to) {
|
|
102
|
+
for (const item of flattenGrantee(to)) if (item.kind === "role") return item.role;
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
function roleScopeOf(to, fallback = "global") {
|
|
106
|
+
for (const item of flattenGrantee(to)) if (item.kind === "role") return item.scope;
|
|
107
|
+
return fallback;
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { authenticated as a, plan as c, roleScopeOf as d, assurance as i, relation as l, anyone as n, flattenGrantee as o, asGrantee as r, inherit as s, actor as t, roleNameOf as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
-
import { o as flattenGrantee } from "./grantee-
|
|
2
|
+
import { o as flattenGrantee } from "./grantee-OG4klcNr.js";
|
|
3
3
|
import { u as isoAt } from "./time-nR1JesoH.js";
|
|
4
4
|
import { d as scopeList, t as activeFor } from "./scopes-gdH__vDZ.js";
|
|
5
5
|
import { r as relationCondition, t as inheritCondition } from "./grantee-conditions-Dzprappv.js";
|
package/dist/h3/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as Policy, N as PolicyVocabulary, en as Snapshot, yr as Principal } from "../policy-types-
|
|
2
|
-
import { a as PermDock } from "../permdock-
|
|
3
|
-
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types
|
|
4
|
-
import { a as ProtectTarget, n as FetchAdapterOptions, r as FetchProtect, t as ContextReader } from "../fetch-adapter-
|
|
1
|
+
import { D as Policy, N as PolicyVocabulary, en as Snapshot, yr as Principal } from "../policy-types-CCBrL7me.js";
|
|
2
|
+
import { a as PermDock } from "../permdock-vD3mwLSm.js";
|
|
3
|
+
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CtJSDhOv.js";
|
|
4
|
+
import { a as ProtectTarget, n as FetchAdapterOptions, r as FetchProtect, t as ContextReader } from "../fetch-adapter-eQ-mdk8n.js";
|
|
5
5
|
import { EventHandler, H3Event, H3EventContext, Middleware } from "h3";
|
|
6
6
|
//#region src/h3/create.d.ts
|
|
7
7
|
type H3PermDockOptions<TUser = unknown> = FetchAdapterOptions<H3Event, TUser>;
|
package/dist/h3/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-
|
|
2
|
-
import { i as decorate } from "../bind-
|
|
3
|
-
import { t as fetchAdapter } from "../fetch-adapter-
|
|
1
|
+
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-Bj5xw0EM.js";
|
|
2
|
+
import { i as decorate } from "../bind-Cx10JuJ-.js";
|
|
3
|
+
import { t as fetchAdapter } from "../fetch-adapter-CAA3VJMX.js";
|
|
4
4
|
//#region src/h3/create.ts
|
|
5
5
|
function createPermDock(policy, options) {
|
|
6
6
|
const adapter = fetchAdapter(policy, options, "h3", (event) => event.req);
|
|
@@ -9,7 +9,7 @@ import { n as toWireDelegation } from "./wire-delegation-Cv3W2eaM.js";
|
|
|
9
9
|
import { r as relationReader, t as pendingRelations } from "./relations-CMsJ1ARY.js";
|
|
10
10
|
import { n as resolveRelated } from "./relation-walk-BDTaTKTM.js";
|
|
11
11
|
import { i as approverRelationKey, s as ApprovalError, t as APPROVAL_HEADER } from "./types-CcUXciSj.js";
|
|
12
|
-
import { n as assertApprover, u as listAllApprovals } from "./store-
|
|
12
|
+
import { n as assertApprover, u as listAllApprovals } from "./store-DXO0aVgf.js";
|
|
13
13
|
import { n as parseApprovalHeader } from "./approval-header-8QV6MU4H.js";
|
|
14
14
|
//#region src/approvals/directory.ts
|
|
15
15
|
/**
|
package/dist/hono/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-
|
|
1
|
+
import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-CCBrL7me.js";
|
|
2
2
|
import { w as Permission } from "../vocabulary-DeZvUaTw.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
3
|
+
import { a as PermDock } from "../permdock-vD3mwLSm.js";
|
|
4
4
|
import { n as RevocationFeed } from "../revocations-BaUXHM1N.js";
|
|
5
|
-
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types
|
|
6
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
5
|
+
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CtJSDhOv.js";
|
|
6
|
+
import { t as ServerAdapterOptions } from "../bind-N5jf6kjk.js";
|
|
7
7
|
import { Context, Hono, MiddlewareHandler } from "hono";
|
|
8
8
|
import { SSEMessage, SSEStreamingApi } from "hono/streaming";
|
|
9
9
|
import { WSEvents } from "hono/ws";
|
package/dist/hono/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { r as PermDockRevokedError } from "../errors-ynga1EQy.js";
|
|
3
|
-
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-
|
|
4
|
-
import { r as bindKernel } from "../bind-
|
|
5
|
-
import { t as problemFromError } from "../map-error-
|
|
3
|
+
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-Bj5xw0EM.js";
|
|
4
|
+
import { r as bindKernel } from "../bind-Cx10JuJ-.js";
|
|
5
|
+
import { t as problemFromError } from "../map-error-BCdb2Nrp.js";
|
|
6
6
|
import { a as onRevoked, n as closeReason, r as guardIterable, t as POLICY_VIOLATION } from "../stream-DQ3rbO3J.js";
|
|
7
7
|
import { Hono } from "hono";
|
|
8
8
|
//#region src/hono/create.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as Policy, Er as Condition, In as Grantee, s as ApprovalRequirement } from "./policy-types-
|
|
1
|
+
import { D as Policy, Er as Condition, In as Grantee, s as ApprovalRequirement } from "./policy-types-CCBrL7me.js";
|
|
2
2
|
//#region src/core/hosted.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* One grant authored in PermDock Cloud; its grantee is a declared role, plan or
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { r as isRecord, t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
3
3
|
import { n as isForbiddenKey, s as splitPath } from "./paths-CUvURzHp.js";
|
|
4
|
-
import { a as deny, i as completeGrant, l as normalizeWhere, n as role, r as allow } from "./role-builder-
|
|
4
|
+
import { a as deny, i as completeGrant, l as normalizeWhere, n as role, r as allow } from "./role-builder-BXdhhQcB.js";
|
|
5
5
|
import { a as getResource, n as findPermission } from "./permission-registry-B8tYxPIt.js";
|
|
6
6
|
import { d as isSelfParented } from "./resource-relations-8-pCScBO.js";
|
|
7
|
-
import {
|
|
7
|
+
import { o as listPlans, r as findRole } from "./vocabulary-BuYFWeCU.js";
|
|
8
|
+
import { o as flattenGrantee } from "./grantee-OG4klcNr.js";
|
|
8
9
|
import { a as durationOf, l as isRfc3339, m as rfc3339 } from "./time-nR1JesoH.js";
|
|
9
10
|
import { r as sha256Digest } from "./sha256-C-4WXKIu.js";
|
|
10
|
-
import { o as readWireApproval } from "./approval-normalize-
|
|
11
|
-
import { a as indexPolicy, n as declaredRoleNames } from "./policy-
|
|
11
|
+
import { o as readWireApproval } from "./approval-normalize-KfhzpD93.js";
|
|
12
|
+
import { a as indexPolicy, n as declaredRoleNames } from "./policy-BovcTojN.js";
|
|
12
13
|
//#region src/core/hosted.ts
|
|
13
14
|
function memoryPolicySource(document = null) {
|
|
14
15
|
const current = document === null ? null : parsePolicyDocument(document);
|
|
@@ -5,7 +5,7 @@ import { s as writeFileEnsuringDir } from "./files-BSjrtIHw.js";
|
|
|
5
5
|
import { r as escapeSqlIdent, s as quoteSqlLiteral } from "./sql-0WjxIp9g.js";
|
|
6
6
|
import { n as pgConnector } from "./pg-Ddxsd5ZB.js";
|
|
7
7
|
import { C as parseMembershipsFlag, r as HELPERS } from "./shared-DfaIWvIJ.js";
|
|
8
|
-
import { t as FIELD_VIEWS } from "./fields-
|
|
8
|
+
import { t as FIELD_VIEWS } from "./fields-B17OWcPx.js";
|
|
9
9
|
import { n as emptySchema, r as isSchemaKind, t as emitPermissionsModule } from "./generate-CezbCaTI.js";
|
|
10
10
|
import { existsSync, readFileSync } from "node:fs";
|
|
11
11
|
import { resolve } from "node:path";
|
|
@@ -4,7 +4,7 @@ import { i as readJsonFile } from "./files-BSjrtIHw.js";
|
|
|
4
4
|
import { t as applyFiles } from "./files-CfiRtQ-m.js";
|
|
5
5
|
import { n as httpRequest } from "./http-dptLQzPP.js";
|
|
6
6
|
import { i as schemaExpression, t as emitPermissionsModule } from "./generate-CezbCaTI.js";
|
|
7
|
-
import { t as validateOpenapi } from "./schema-
|
|
7
|
+
import { t as validateOpenapi } from "./schema-UOeI_LTB.js";
|
|
8
8
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
9
|
import { resolve } from "node:path";
|
|
10
10
|
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/identity.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as DecisionSink, it as MembershipSource, vt as TokenVerifier } from "./policy-types-
|
|
1
|
+
import { X as DecisionSink, it as MembershipSource, vt as TokenVerifier } from "./policy-types-CCBrL7me.js";
|
|
2
2
|
import { K as AppData } from "./vocabulary-DeZvUaTw.js";
|
|
3
3
|
import { t as ClaimsMap } from "./claims-map-D1Pb5oRq.js";
|
|
4
4
|
import { n as RevocationFeed } from "./revocations-BaUXHM1N.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as Policy, N as PolicyVocabulary, Tt as SupportSession, Yn as Decision, _t as TokenSigner, gt as TokenFailureCause, sn as AuthEvent, vt as TokenVerifier, xr as Subject, yr as Principal } from "./policy-types-
|
|
1
|
+
import { D as Policy, N as PolicyVocabulary, Tt as SupportSession, Yn as Decision, _t as TokenSigner, gt as TokenFailureCause, sn as AuthEvent, vt as TokenVerifier, xr as Subject, yr as Principal } from "./policy-types-CCBrL7me.js";
|
|
2
2
|
import { E as PermissionTree, w as Permission } from "./vocabulary-DeZvUaTw.js";
|
|
3
|
-
import { _ as PrincipalSource } from "./permdock-
|
|
4
|
-
import { a as ProblemDetails, s as Disclosure, t as ApprovalHint } from "./errors-
|
|
5
|
-
import { c as ServerPermDock, l as ServerPermDockOptions } from "./server-types
|
|
3
|
+
import { _ as PrincipalSource } from "./permdock-vD3mwLSm.js";
|
|
4
|
+
import { a as ProblemDetails, s as Disclosure, t as ApprovalHint } from "./errors-CXxQwtbZ.js";
|
|
5
|
+
import { c as ServerPermDock, l as ServerPermDockOptions } from "./server-types-CtJSDhOv.js";
|
|
6
6
|
//#region src/server/create.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* The Fetch factory behind every HTTP adapter. The subject and actor are
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as Policy, _t as TokenSigner, yr as Principal } from "./policy-types-
|
|
2
|
-
import { E as SsfPermDockOptions, O as SsfStreamConfiguration, T as SsfPermDock, _ as SetSubject, c as PushSetOptions, d as SetDelivery, g as SetQueue, h as SetPollHandlerOptions, k as SsfStreamStatus, m as SetEvent, p as SetError, t as CaepCommon, v as SignSetOptions } from "./types-
|
|
1
|
+
import { D as Policy, _t as TokenSigner, yr as Principal } from "./policy-types-CCBrL7me.js";
|
|
2
|
+
import { E as SsfPermDockOptions, O as SsfStreamConfiguration, T as SsfPermDock, _ as SetSubject, c as PushSetOptions, d as SetDelivery, g as SetQueue, h as SetPollHandlerOptions, k as SsfStreamStatus, m as SetEvent, p as SetError, t as CaepCommon, v as SignSetOptions } from "./types-CdXM6qPc.js";
|
|
3
3
|
//#region src/ssf/create.d.ts
|
|
4
4
|
declare function createPermDock<TUser, TPrincipal extends Principal = Principal>(policy: Policy<TUser, TPrincipal>, options: SsfPermDockOptions): SsfPermDock;
|
|
5
5
|
//#endregion
|