permdock 0.35.0 → 0.36.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 +1 -1
- package/dist/a2a/index.js +2 -2
- package/dist/{adoption-scan-oaPsvHSN.js → adoption-scan-FcbJOEo1.js} +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.d.ts +1 -1
- package/dist/ai-sdk/index.js +3 -3
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +1 -1
- package/dist/approvals/index.d.ts +1 -1
- package/dist/{arazzo-B2PszcDL.js → arazzo-BRWgVc8j.js} +1 -1
- package/dist/{arazzo-1oDMApA_.js → arazzo-rYG2UY9k.js} +2 -2
- package/dist/astro/index.d.ts +3 -3
- package/dist/astro/index.js +1 -1
- package/dist/authzen/index.d.ts +3 -3
- package/dist/authzen/index.js +1 -1
- package/dist/better-supabase/index.d.ts +13 -4
- package/dist/better-supabase/index.js +8 -8
- package/dist/{bind-DPptdk31.js → bind-2Cuy29LS.js} +2 -2
- package/dist/{bind-BnrOLyJq.d.ts → bind-Caffleoh.d.ts} +5 -5
- package/dist/{bsb-access-tags-uDuwPUbT.js → bsb-access-tags-Bfmhft2o.js} +1 -1
- package/dist/{bsb-action-keys-BfZAwg-9.js → bsb-action-keys-LgveZiHJ.js} +2 -2
- package/dist/{bsb-actions-BHiyBxQZ.js → bsb-actions-DcDxQ_Ku.js} +3 -3
- package/dist/{budgets-hi-ecgEd.js → budgets-B2hIDaz7.js} +2 -2
- package/dist/{build-instance-DZEWYO-A.js → build-instance-CZg_Bf45.js} +1 -1
- package/dist/{bundle-size-DbXV65Ix.js → bundle-size-BjdmlKWJ.js} +2 -2
- package/dist/bundle-size-BoG9Jm7c.js +1 -0
- package/dist/{casbin-vtIUd-6L.js → casbin-4FACZ5Ez.js} +1 -1
- package/dist/{casbin-DrdS0vLy.js → casbin-Cz8BGXHW.js} +1 -1
- package/dist/{catalog-CBPFyRv7.js → catalog-DYC6wfAj.js} +1 -1
- package/dist/{catalog-BExjL94D.js → catalog-SnaPhbZ1.js} +2 -2
- package/dist/{catalog-doc-D4g3nyFB.js → catalog-doc-BX97oFAn.js} +1 -1
- package/dist/catalog-e6QRd1JP.js +1 -0
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat-sdk/index.d.ts +1 -1
- package/dist/claude-agent/index.d.ts +2 -2
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/watch-worker.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/plugins/app.js +1 -1
- package/dist/cli/plugins/openapi.js +1 -1
- package/dist/cli/plugins/powersync.js +1 -1
- package/dist/cli/plugins/rls.js +1 -1
- package/dist/cli/plugins/schemas.js +1 -1
- package/dist/cli/plugins/supabase-hook.js +1 -1
- package/dist/cli/plugins/supabase.js +2 -2
- package/dist/cli/plugins/ui.js +1 -1
- package/dist/{cloud-BQnIR-SS.js → cloud-BB67klb4.js} +2 -2
- package/dist/{codemod-C0OHCnaj.js → codemod-BPcxGOlq.js} +5 -5
- package/dist/{codemod-rv5XSBNw.js → codemod-Lov9764v.js} +1 -1
- package/dist/collect-C2_CKZ09.js +1 -0
- package/dist/{collect-Ba7ccZ23.js → collect-CcE8QBtZ.js} +2 -2
- package/dist/{collect-CPimbkC5.js → collect-Co-w8Eg2.js} +1 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-CoUadQXF.d.ts → compile-CyUn58lf.d.ts} +1 -1
- package/dist/{compile-BRDpja_Y.js → compile-EtZv2wc0.js} +6 -6
- package/dist/{completion-Dgjdte2-.js → completion-5Y8toe1d.js} +1 -1
- package/dist/{config-anQ9E37F.js → config-DfbiV554.js} +1 -1
- package/dist/{config-report-C43BSFHY.js → config-report-Cs6iDebE.js} +2 -2
- package/dist/{context-rioF4fQl.js → context-CFPsmfPl.js} +1 -1
- package/dist/convex/index.d.ts +2 -2
- package/dist/convex/index.js +2 -2
- package/dist/{core-DCMIztx1.d.ts → core-_Lofwt2K.d.ts} +1 -1
- package/dist/{core-DIUrkFNL.js → core-s_TCdJ6G.js} +2 -2
- package/dist/{create-BYL8xCJB.d.ts → create-BfTbYrts.d.ts} +1 -1
- package/dist/{create-T_NqxU31.d.ts → create-D12I1Vkl.d.ts} +4 -4
- package/dist/{create-BMRnaZel.js → create-D6B06lb8.js} +3 -3
- package/dist/{create-iCwrnaFE.d.ts → create-EPbgV-LA.d.ts} +2 -2
- package/dist/{create-BRY0OtFV.js → create-bbjS7tCW.js} +2 -2
- package/dist/{credentials-DzNrCNZY.d.ts → credentials-DtSnydoD.d.ts} +1 -1
- package/dist/{custom-role-rebuild-wzN8pqDk.js → custom-role-rebuild-QFXiMHqJ.js} +1 -1
- package/dist/{define-permdock-CO7YNrOF.js → define-permdock-Dazve5lw.js} +1 -1
- package/dist/{define-permdock-Bhye7WSY.d.ts → define-permdock-ZR0w-Loy.d.ts} +3 -3
- package/dist/delivery/index.d.ts +1 -1
- package/dist/{diff-CkSZF7LO.js → diff-BABnQ-z0.js} +3 -3
- package/dist/{diff-CS8ks9h3.js → diff-C7zKA7ny.js} +1 -1
- package/dist/{doctor-GnMgqGO8.js → doctor-Chio5Col.js} +101 -31
- package/dist/{doctor-sAqU02Fx.js → doctor-Cm1HDI5s.js} +2 -2
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/elysia/index.d.ts +3 -3
- package/dist/elysia/index.js +1 -1
- package/dist/{evaluations-CUkSKioS.d.ts → evaluations-BYoj5ci6.d.ts} +1 -1
- package/dist/eve/index.d.ts +2 -2
- package/dist/eve/index.js +2 -2
- package/dist/{execute-xF5fwAel.js → execute-B_yY9xWV.js} +4 -4
- package/dist/{explain-DISCeeYS.js → explain-Blkq60Ff.js} +2 -2
- package/dist/{explain-D4ipf8IH.js → explain-CKIqxXSe.js} +1 -1
- package/dist/express/index.d.ts +3 -3
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +3 -3
- package/dist/fastify/index.js +1 -1
- package/dist/{fetch-adapter-Ds2-fUUi.d.ts → fetch-adapter-CdaSVKrt.d.ts} +2 -2
- package/dist/{fetch-adapter-BXQc4NoV.js → fetch-adapter-DXgza6EM.js} +1 -1
- package/dist/{fields-CwFej4gp.js → fields-CKX-qjWb.js} +1 -1
- package/dist/gen-CYuPbpBZ.js +1 -0
- package/dist/{gen-djPw1RS-.js → gen-DlJK73v7.js} +4 -4
- package/dist/{gen-kind-Vhq_ZIZm.js → gen-kind-C4tERYMw.js} +1 -1
- package/dist/{generate-BcH-uL0z.js → generate-CFqcr3H6.js} +95 -16
- package/dist/{generate-CYHeuPq8.js → generate-CbLA2WW_.js} +3 -3
- package/dist/{generate-options-DDSeUTFU.js → generate-options-BFAvlJKQ.js} +9 -9
- package/dist/h3/index.d.ts +3 -3
- package/dist/h3/index.js +2 -2
- package/dist/{helper-calls-B5MOl99d.js → helper-calls-DN1PJcNY.js} +53 -1
- package/dist/hono/index.d.ts +3 -3
- package/dist/hono/index.js +1 -1
- package/dist/{hook-sql-EksAnz-T.js → hook-sql-CSUFnRn0.js} +283 -13
- package/dist/{import-C45gc74U.js → import-B-17dw3B.js} +1 -1
- package/dist/{import-Bz6IKoMM.js → import-wBO24zgo.js} +1 -1
- package/dist/{index-Cjr8Q-uq.d.ts → index-Bb2sZq1K.d.ts} +8 -7
- package/dist/{index-CWBCzwOp.d.ts → index-CT4VKXU-.d.ts} +1 -1
- package/dist/{index-ktQ7E4qB.d.ts → index-Cfg0ED9K.d.ts} +2 -2
- package/dist/{index-BOJPdIBk.d.ts → index-DY1aJ-K1.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/{init-B6aZxzd7.js → init-Bg0vS1LV.js} +1 -1
- package/dist/{init-CCBVeyW8.js → init-DRbkPclr.js} +3 -3
- package/dist/{inspect-functions-BUACOlgS.js → inspect-functions-DLP72IMA.js} +1 -1
- package/dist/{instance-options-DDERlopm.d.ts → instance-options-D-SLCp4I.d.ts} +1 -1
- package/dist/{interactive-only-Bbq9e61G.js → interactive-only-CylKSukS.js} +1 -1
- package/dist/{kernel-DSnWVZ0O.js → kernel-CzzmzwLg.js} +3 -3
- package/dist/{keys-BWhAnANj.js → keys-C-W0yrql.js} +1 -1
- package/dist/kysely/index.d.ts +2 -2
- package/dist/{lazy-provider-Clt2095H.d.ts → lazy-provider-BSHAIpMK.d.ts} +1 -1
- package/dist/{login-BnE2iUUA.js → login-D6IJk8k1.js} +1 -1
- package/dist/{login-d631Tpa9.js → login-yF-sDNm9.js} +3 -3
- package/dist/{manifest-1w67doim.js → manifest-DkHIGPoY.js} +63 -52
- package/dist/{manifest-schema-N3v2RVL-.js → manifest-schema-CkROwfT9.js} +1 -1
- package/dist/{manifest-CIWOmdlP.js → manifest-teSfgeqF.js} +1 -1
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +2 -2
- package/dist/{measure-BKsYdwKd.js → measure-_VlSPfSY.js} +2 -2
- package/dist/{memberships-CNoAlsma.js → memberships-CDiSsFTu.js} +1 -1
- package/dist/{memberships-4e6qi8Uv.js → memberships-DiCbNRny.js} +1 -1
- package/dist/{model-BYCtXS_g.js → model-r7X_HXyS.js} +2 -2
- package/dist/{names-DBxKx2bz.js → names-DwGleRKB.js} +3 -3
- package/dist/nest/index.d.ts +3 -3
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +6 -6
- package/dist/next/index.js +3 -3
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +1 -1
- package/dist/openai/index.d.ts +2 -2
- package/dist/openai/index.js +3 -3
- package/dist/{openapi-CN2Oq9zN.js → openapi-D156UqcM.js} +100 -5
- package/dist/{openapi-BnKSxOrh.js → openapi-Dcqqja0n.js} +1 -1
- package/dist/{openapi-document-XnGRbWBb.js → openapi-document-CTvHkCXz.js} +1 -1
- package/dist/orpc/index.d.ts +4 -4
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +2 -2
- package/dist/{output-dO4bArCS.js → output-DNbj0_Yi.js} +1 -1
- package/dist/{ownership-CSdLGGfW.js → ownership-BvKT4DBj.js} +3 -3
- package/dist/pdp/index.d.ts +2 -2
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-DkvkGVF0.d.ts → permdock-CHU1LZGq.d.ts} +5 -3
- package/dist/{permdock-JM9TKevZ.js → permdock-DZmr2kJw.js} +2 -1
- package/dist/{permissions-xPyAmuXi.js → permissions-DUmypTlO.js} +1 -1
- package/dist/{pipeline-BAGSNnct.js → pipeline-BMbLI2Sj.js} +2 -2
- package/dist/{policy-CTn-9VQm.js → policy-DekUQ-6v.js} +1 -1
- package/dist/{policy-bundle-BHd1dqU9.js → policy-bundle-JU4-AFJM.js} +3 -3
- package/dist/{powersync-Jj57J-X8.js → powersync-CpxkK_Lz.js} +1 -1
- package/dist/{powersync-CZkZgVyi.js → powersync-D9ZLDzyv.js} +1 -1
- package/dist/{powersync-DJ7dY-Vf.js → powersync-cG4lxrzQ.js} +8 -8
- package/dist/prisma/index.d.ts +1 -1
- package/dist/{protected-action-gBxeetqY.d.ts → protected-action-Dux5RJbA.d.ts} +3 -3
- package/dist/{provider-Clt2095H.d.ts → provider-BSHAIpMK.d.ts} +1 -1
- package/dist/{provider-BwqzED5h.js → provider-BfKUBNyV.js} +32 -5
- package/dist/{prune-config-Bwz4wNQA.js → prune-config-ByigsAkl.js} +4 -4
- package/dist/{pull-Cj_ngsuu.js → pull-4Cyo0uTS.js} +3 -3
- package/dist/pull-_ic7Md2h.js +1 -0
- package/dist/{push-D5so0ptb.js → push-Br0Uz5pT.js} +2 -2
- package/dist/{rbac-DbyaaNLa.js → rbac-BOVyTCI6.js} +3 -3
- package/dist/react/index.d.ts +4 -4
- package/dist/react/lazy.d.ts +4 -4
- package/dist/react/provider-client-lazy.d.ts +1 -1
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react-native/index.d.ts +4 -4
- package/dist/{rename-CI6NIF9t.js → rename-Dp47Gs_j.js} +2 -2
- package/dist/{report-DF0zUNut.js → report-Dp-ApWVC.js} +1 -1
- package/dist/{report-XdCm1y_J.js → report-x9GeUvjx.js} +1 -1
- package/dist/{request-context-CqqdiVp4.js → request-context-LvIolknK.js} +1 -1
- package/dist/{resolve-names-CuEhEQyB.js → resolve-names-B_no27Dh.js} +4 -4
- package/dist/{resolver-D2c1CcoZ.js → resolver-CAmmdVAL.js} +22 -11
- package/dist/{rls-DcqSn7b2.js → rls-C816Uuvx.js} +5 -5
- package/dist/{rls-BDtyip5c.js → rls-DB18scnl.js} +13 -12
- package/dist/{rls-files-CRRtjXxG.js → rls-files-Cp-qzl61.js} +1 -1
- package/dist/{row-conditions-DwIJocfQ.js → row-conditions-BjARoFLU.js} +1 -1
- package/dist/{rpc-BYFB37KV.d.ts → rpc-CL8lrV5Y.d.ts} +1 -1
- package/dist/{rpc-BQPa7tLP.js → rpc-CoClxzcc.js} +1 -1
- package/dist/{run-DvbrPkgt.js → run-CJhz8BHw.js} +2 -2
- package/dist/run-PpoUQXDc.js +1 -0
- package/dist/{run-ticket-CRldclc7.d.ts → run-ticket-CCRYQNj0.d.ts} +1 -1
- package/dist/{saas-DSeazNrN.js → saas-iXqf78G8.js} +2 -2
- package/dist/{scan-CmfWbAbz.js → scan-DvM-_F8-.js} +1 -1
- package/dist/{schema-CO3btX_O.js → schema-uTRr3B9f.js} +1 -1
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +1 -1
- package/dist/{server-types-FkdDSB9h.d.ts → server-types-C_Lnc8Ec.d.ts} +5 -5
- package/dist/{size-CY6rK6l9.js → size-BO7J8M3B.js} +2 -2
- package/dist/{skills-C28GUaJC.js → skills-B5exEJf5.js} +1 -1
- package/dist/{skills-CA8GfQxQ.js → skills-DF_3nX9_.js} +1 -1
- package/dist/{snapshot-size-D6ixbYvH.js → snapshot-size-BzamcZrn.js} +1 -1
- package/dist/{snapshot-size-NklqBKcV.js → snapshot-size-CJ53OOen.js} +1 -1
- package/dist/solid/index.d.ts +2 -2
- package/dist/solid-start/index.d.ts +3 -3
- package/dist/solid-start/index.js +2 -2
- package/dist/{src-BXDohWNO.js → src-CYKqpYUM.js} +4 -4
- package/dist/{store-core-aluQ3R1M.d.ts → store-core-D5-cqb6z.d.ts} +1 -1
- package/dist/{stores-hHICuiQl.d.ts → stores-DPUPLu29.d.ts} +3 -3
- package/dist/supabase/index.d.ts +2 -2
- package/dist/supabase/index.js +3 -3
- package/dist/supabase/middleware.d.ts +4 -4
- package/dist/supabase/middleware.js +3 -3
- package/dist/{supabase-DXEcFJGM.js → supabase-Dpy2XE9v.js} +2 -2
- package/dist/{supabase-ByhSqBDB.js → supabase-NpHqrRXC.js} +2 -2
- package/dist/supabase-hook-DaK4Rirh.js +2 -0
- package/dist/{supabase-hook-D-ybV98H.js → supabase-hook-VIpXUHKI.js} +5 -5
- package/dist/{supabase-schemas-CVhpyYB6.js → supabase-schemas-DA28GP4N.js} +1 -1
- package/dist/{supautils-C85NuESf.js → supautils-ym4X20ig.js} +2 -1
- package/dist/svelte/index.d.ts +3 -3
- package/dist/svelte/runtime.d.ts +2 -2
- package/dist/svelte/source.d.ts +3 -3
- package/dist/sveltekit/index.d.ts +3 -3
- package/dist/sveltekit/index.js +1 -1
- package/dist/{table-reads-BcceuV7h.js → table-reads-4KzGXg9f.js} +1 -1
- package/dist/{table-reads-BoF_58yh.js → table-reads-B5kunhny.js} +3 -3
- package/dist/{tables-BTXmioCH.js → tables-BwQvlpS4.js} +10 -5
- package/dist/tanstack-start/index.d.ts +3 -3
- package/dist/tanstack-start/index.js +1 -1
- package/dist/{tenant-check-DNbm8OiV.js → tenant-check-CsJkduIb.js} +3 -3
- package/dist/terminal/index.d.ts +2 -2
- package/dist/terminal/index.js +2 -2
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.js +1753 -162
- package/dist/testing/index.d.ts +7 -7
- package/dist/testing/index.js +6 -6
- package/dist/testing/saas/index.d.ts +1 -1
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +4 -4
- package/dist/trpc/index.js +2 -2
- package/dist/{types-DRMoZjJm.d.ts → types-B23A72BG.d.ts} +1 -1
- package/dist/{types-D417woMp.d.ts → types-BRaJxlqL.d.ts} +2 -2
- package/dist/{types-CBUYbPwl.d.ts → types-C8sDUhaF.d.ts} +1 -1
- package/dist/{types-dtDg4goh.d.ts → types-CM5GwxiJ.d.ts} +2 -2
- package/dist/{types-BzsplNgO.d.ts → types-iwSmOTcK.d.ts} +2 -2
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-D5QwWiNp.js → usage-BD_z4pba.js} +1 -1
- package/dist/{usage-BGuSrwiW.js → usage-_9h9jQo8.js} +4 -4
- package/dist/usage-wphGxzPQ.js +1 -0
- package/dist/{verify-GWeopgxU.js → verify-cw6SFoQE.js} +9 -9
- package/dist/vue/index.d.ts +2 -2
- package/dist/{warm-BZ0ZwSmO.js → warm-XyQ-2nUR.js} +1 -1
- package/dist/watch-5WP3ZCcR.js +1 -0
- package/dist/{watch-14vng0pg.js → watch-BFDMb5N4.js} +1 -1
- package/dist/{watch-DuIAsqFR.js → watch-Cvc7eUPk.js} +2 -2
- package/dist/workflow/index.d.ts +1 -1
- package/dist/workflow/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +2 -2
- package/dist/{wrap-C36-eV-C.d.ts → wrap-B4Ge6LOd.d.ts} +1 -1
- package/package.json +1 -1
- package/schemas/supabase-manifest-v1.json +1 -1
- package/dist/bundle-size-BRFeBvuv.js +0 -1
- package/dist/catalog-sR0m6x2g.js +0 -1
- package/dist/collect-CIdE3FGC.js +0 -1
- package/dist/gen-BPYFr_tZ.js +0 -1
- package/dist/pull-BOC-0kJV.js +0 -1
- package/dist/run-DOP1UKWw.js +0 -1
- package/dist/supabase-hook-C_ViYz3g.js +0 -2
- package/dist/usage-CW6PfRfC.js +0 -1
- package/dist/watch-Be7ja4dL.js +0 -1
package/dist/elysia/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
|
|
2
|
-
import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-
|
|
2
|
+
import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-2Cuy29LS.js";
|
|
3
3
|
import { a as parsedBody, r as hasCredentials } from "../http-C9jDw_bZ.js";
|
|
4
4
|
import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
|
|
5
5
|
import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as ApprovalStore } from "./types-BGN3coSe.js";
|
|
2
|
-
import { a as PermDock } from "./permdock-
|
|
2
|
+
import { a as PermDock } from "./permdock-CHU1LZGq.js";
|
|
3
3
|
import { D as Policy } from "./policy-types-DuM3k5Ao.js";
|
|
4
4
|
/** AuthZEN 1.0 section 7.1.2.1 `options.evaluations_semantic` values. */
|
|
5
5
|
declare const EVALUATIONS_SEMANTICS: readonly ["execute_all", "deny_on_first_deny", "permit_on_first_permit"];
|
package/dist/eve/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-
|
|
1
|
+
import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-D12I1Vkl.js";
|
|
2
2
|
import { u as ApprovalRequest } from "../types-BGN3coSe.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
3
|
+
import { a as PermDock } from "../permdock-CHU1LZGq.js";
|
|
4
4
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
5
5
|
import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-DuM3k5Ao.js";
|
|
6
6
|
/** Structural `SessionAuthContext` from `eve`. */
|
package/dist/eve/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as agentRuntime } from "../create-
|
|
1
|
+
import { t as agentRuntime } from "../create-bbjS7tCW.js";
|
|
2
2
|
import { t as boundedMap } from "../lru-Cp-AEvpR.js";
|
|
3
3
|
import { c as isApprovalError } from "../types-DFZKovb3.js";
|
|
4
4
|
import { o as resolveApproval } from "../helpers-COh0lLc1.js";
|
|
5
|
-
import { u as withApp } from "../permdock-
|
|
5
|
+
import { u as withApp } from "../permdock-DZmr2kJw.js";
|
|
6
6
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
7
7
|
// src/eve/create.ts
|
|
8
8
|
const TOKENS_PER_PROCESS = 1e3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as budgetBreaches, t as breachText } from "./budgets-
|
|
1
|
+
import { n as budgetBreaches, t as breachText } from "./budgets-B2hIDaz7.js";
|
|
2
2
|
import { a as suggestion } from "./args-BSpXxMnb.js";
|
|
3
3
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
4
|
-
import { r as runGen } from "./gen-
|
|
4
|
+
import { r as runGen } from "./gen-DlJK73v7.js";
|
|
5
5
|
import { c as requirePolicy } from "./load-m7jmit3y.js";
|
|
6
|
-
import { t as projectContext } from "./context-
|
|
7
|
-
import { r as runGenerate } from "./pipeline-
|
|
6
|
+
import { t as projectContext } from "./context-CFPsmfPl.js";
|
|
7
|
+
import { r as runGenerate } from "./pipeline-BMbLI2Sj.js";
|
|
8
8
|
import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
|
|
9
9
|
import { relative, resolve } from "node:path";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as findPermission } from "./permission-registry-DstT40VS.js";
|
|
2
|
-
import { t as getPermDock } from "./permdock-
|
|
3
|
-
import { A as memoryCustomRoleSource } from "./src-
|
|
2
|
+
import { t as getPermDock } from "./permdock-DZmr2kJw.js";
|
|
3
|
+
import { A as memoryCustomRoleSource } from "./src-CYKqpYUM.js";
|
|
4
4
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
5
5
|
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-3aUUP6Nx.js";
|
|
6
6
|
// src/cli/explain.ts
|
|
@@ -19,7 +19,7 @@ const explain = defineLeaf({
|
|
|
19
19
|
},
|
|
20
20
|
async run(ctx, { flags, args }) {
|
|
21
21
|
try {
|
|
22
|
-
const { runExplain } = await import("./explain-
|
|
22
|
+
const { runExplain } = await import("./explain-Blkq60Ff.js");
|
|
23
23
|
const policy = await requirePolicy(ctx.cwd, given(flags.policy) ?? ctx.config.policy, "set policy in permdock.config.ts or pass --policy");
|
|
24
24
|
return await runExplain({
|
|
25
25
|
cwd: ctx.cwd,
|
package/dist/express/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-
|
|
2
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C_Lnc8Ec.js";
|
|
2
|
+
import { a as PermDock } from "../permdock-CHU1LZGq.js";
|
|
3
3
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
4
4
|
import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-DuM3k5Ao.js";
|
|
5
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
5
|
+
import { t as ServerAdapterOptions } from "../bind-Caffleoh.js";
|
|
6
6
|
import { i as toRequest, r as sendResponse } from "../http-BUIYu1Kc.js";
|
|
7
7
|
import { ErrorRequestHandler, Request, RequestHandler, Response, Router } from "express";
|
|
8
8
|
type ExpressPermDockOptions<TUser = unknown> = ServerAdapterOptions<Request, TUser>;
|
package/dist/express/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
|
|
2
|
-
import { i as decorate, r as bindKernel } from "../bind-
|
|
2
|
+
import { i as decorate, r as bindKernel } from "../bind-2Cuy29LS.js";
|
|
3
3
|
import { r as hasCredentials } from "../http-C9jDw_bZ.js";
|
|
4
4
|
import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
|
|
5
5
|
import { n as sendResponse, r as toRequest } from "../http-dNltTpC8.js";
|
package/dist/fastify/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-
|
|
2
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C_Lnc8Ec.js";
|
|
2
|
+
import { a as PermDock } from "../permdock-CHU1LZGq.js";
|
|
3
3
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
4
4
|
import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-DuM3k5Ao.js";
|
|
5
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
5
|
+
import { t as ServerAdapterOptions } from "../bind-Caffleoh.js";
|
|
6
6
|
import { FastifyPluginAsync, FastifyReply, FastifyRequest, FastifySchema, FastifyTypeProvider, FastifyTypeProviderDefault, RawRequestDefaultExpression, RawServerDefault, RouteGenericInterface } from "fastify";
|
|
7
7
|
/** A Fastify-style reply: `code`, `header` and `send`. */
|
|
8
8
|
type ReplyLike = {
|
package/dist/fastify/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
|
|
2
|
-
import { i as decorate, r as bindKernel } from "../bind-
|
|
2
|
+
import { i as decorate, r as bindKernel } from "../bind-2Cuy29LS.js";
|
|
3
3
|
import { c as writeReply, i as headersFrom, n as firstHeader, r as hasCredentials, t as fetchRequest } from "../http-C9jDw_bZ.js";
|
|
4
4
|
import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
|
|
5
5
|
// src/fastify/http.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as OperationInput, t as Operation } from "./operations-DaEoGpMV.js";
|
|
2
2
|
import { w as Permission } from "./vocabulary-DHfKPIC5.js";
|
|
3
3
|
import { n as RevocationFeed } from "./revocations-ku_f2d2y.js";
|
|
4
|
-
import { t as ServerAdapterOptions } from "./bind-
|
|
5
|
-
import { o as ProtectOptions } from "./server-types-
|
|
4
|
+
import { t as ServerAdapterOptions } from "./bind-Caffleoh.js";
|
|
5
|
+
import { o as ProtectOptions } from "./server-types-C_Lnc8Ec.js";
|
|
6
6
|
/**
|
|
7
7
|
* What `protect` checks: a permission, an operation from `defineOperations`, or
|
|
8
8
|
* `null` for a route that needs only OAuth scopes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as compact } from "./compact-C4LFuqbW.js";
|
|
2
2
|
import { o as isPermission } from "./permission-registry-DstT40VS.js";
|
|
3
|
-
import { i as decorate, r as bindKernel } from "./bind-
|
|
3
|
+
import { i as decorate, r as bindKernel } from "./bind-2Cuy29LS.js";
|
|
4
4
|
import { r as hasCredentials } from "./http-C9jDw_bZ.js";
|
|
5
5
|
import { t as problemFromError } from "./map-error-DYQbf-3Q.js";
|
|
6
6
|
import { o as methodNotAllowed } from "./problem-BZB7zPC7.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as jsonSchemaOf } from "./catalog-doc-
|
|
1
|
+
import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
|
|
2
2
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { a as quoteIdent, i as qualified, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-LNaBdCGA.js";
|
|
4
4
|
import { s as signedIn } from "./shared-DnVY767H.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as renderKinds } from "./gen-DlJK73v7.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as clientBundle } from "./permdock-
|
|
1
|
+
import { p as clientBundle } from "./permdock-DZmr2kJw.js";
|
|
2
2
|
import { t as loadConfiguredOperations } from "./catalog-operations-BqSsByIE.js";
|
|
3
3
|
import { i as configError, n as CliError } from "./errors-DgLOqc6j.js";
|
|
4
4
|
import { n as fileSummary, r as planFiles } from "./files-DuV7wRim.js";
|
|
@@ -12,8 +12,8 @@ import { t as byCodePoint } from "./compare-dfHDj8kT.js";
|
|
|
12
12
|
import { c as listPermissions } from "./permission-registry-DstT40VS.js";
|
|
13
13
|
import { d as scopeList } from "./scopes-B-KX9EI8.js";
|
|
14
14
|
import { o as listPlans, s as listRoles } from "./vocabulary-CE2k7s1a.js";
|
|
15
|
-
import { c as jsonSchemaOf } from "./catalog-doc-
|
|
16
|
-
import { t as resolveNames } from "./resolve-names-
|
|
15
|
+
import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
|
|
16
|
+
import { t as resolveNames } from "./resolve-names-B_no27Dh.js";
|
|
17
17
|
import { t as DESCRIBE_TITLES } from "./describe-B7EosIKA.js";
|
|
18
18
|
import { i as schemaExpression } from "./generate-5_kz2309.js";
|
|
19
19
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -401,7 +401,7 @@ function modelDigest(model) {
|
|
|
401
401
|
return createHash("sha256").update(canonicalJson(model)).digest("base64url");
|
|
402
402
|
}
|
|
403
403
|
/**
|
|
404
|
-
* `// @generated by permdock generate zod@0.
|
|
404
|
+
* `// @generated by permdock generate zod@0.36.0 from policy.ts sha-256:…; do
|
|
405
405
|
* not edit`.
|
|
406
406
|
*/
|
|
407
407
|
function generatedHeader(kind, info) {
|
|
@@ -47,7 +47,7 @@ function kindPlugin(kind, options = {}) {
|
|
|
47
47
|
}],
|
|
48
48
|
emit: async (_task, model, source) => {
|
|
49
49
|
if (source === void 0) return [];
|
|
50
|
-
const { renderKinds } = await import("./gen-
|
|
50
|
+
const { renderKinds } = await import("./gen-CYuPbpBZ.js");
|
|
51
51
|
const files = await renderKinds({
|
|
52
52
|
cwd: source.cwd,
|
|
53
53
|
config: source.config,
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { c as listPermissions, u as renamedKeys } from "./permission-registry-DstT40VS.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as policyRowConditionKeys, t as grantHasRowConditions } from "./row-conditions-BjARoFLU.js";
|
|
3
3
|
import { a as describeError, i as configError, o as exitCodeOfError } from "./errors-DgLOqc6j.js";
|
|
4
4
|
import { i as withSchemaDefaults } from "./schema-tables-Ba9LE_XB.js";
|
|
5
5
|
import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
|
|
6
6
|
import { n as supabaseDir } from "./supabase-dir-0lxKbrYu.js";
|
|
7
7
|
import { a as parseSqlFile, f as stringValues, g as statementRanges, l as readRelation, m as splitUndiffed, o as parseSqlLenient, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
|
|
8
8
|
import { n as loadBsbSql, r as schemaSqlFiles } from "./bsb-access-Bcw6GrQm.js";
|
|
9
|
-
import { D as seedSql, F as guardAuthAdminGrants, I as unguardAuthAdminGrants, S as accessSql, T as helpersSql, Z as closureBackfillSql, c as permissionHelpersSql, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, r as tableNameOf, s as checkName, tt as graphSql, u as permissionKeysHelper } from "./tables-
|
|
9
|
+
import { D as seedSql, F as guardAuthAdminGrants, I as unguardAuthAdminGrants, S as accessSql, T as helpersSql, Z as closureBackfillSql, c as permissionHelpersSql, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, r as tableNameOf, s as checkName, tt as graphSql, u as permissionKeysHelper } from "./tables-BwQvlpS4.js";
|
|
10
10
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
11
|
-
import { a as tableFor, d as pruneIndexTargets, f as readTableIndexFacts, i as inferredCommand, l as indexTargets, r as compileGrants, u as indexesSql } from "./compile-
|
|
12
|
-
import { a as CANDIDATES, c as rowHelpersSql, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions } from "./generate-options-
|
|
11
|
+
import { a as tableFor, d as pruneIndexTargets, f as readTableIndexFacts, i as inferredCommand, l as indexTargets, r as compileGrants, u as indexesSql } from "./compile-EtZv2wc0.js";
|
|
12
|
+
import { a as CANDIDATES, c as rowHelpersSql, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions } from "./generate-options-BFAvlJKQ.js";
|
|
13
13
|
import { t as policyFromCatalog } from "./policy-from-catalog-BohzTN3J.js";
|
|
14
|
-
import { t as fetchProjectPolicy } from "./pull-
|
|
14
|
+
import { t as fetchProjectPolicy } from "./pull-4Cyo0uTS.js";
|
|
15
15
|
import { c as requirePolicy } from "./load-m7jmit3y.js";
|
|
16
|
-
import { o as nonEmptyOr } from "./output-
|
|
16
|
+
import { o as nonEmptyOr } from "./output-DNbj0_Yi.js";
|
|
17
17
|
import { i as INDEXES_MARKER, n as GRANTS_MARKER, o as SEEDS_MARKER, t as BACKFILL_MARKER } from "./markers-C-kThnKN.js";
|
|
18
|
-
import { S as scopeTable, h as memberIdsHelper, i as graphSqlName, r as graphHelper, t as BOOTSTRAP_PERMISSIONS, x as scopeSources, y as permittedIdsHelper } from "./names-
|
|
18
|
+
import { S as scopeTable, h as memberIdsHelper, i as graphSqlName, r as graphHelper, t as BOOTSTRAP_PERMISSIONS, x as scopeSources, y as permittedIdsHelper } from "./names-DwGleRKB.js";
|
|
19
19
|
import { a as quoteIdent, c as quoteTable, i as qualified$1, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
|
|
20
20
|
import { b as idTypeOf, f as subjectIdSql, l as sessionLiveHelperSql, t as SESSION_LIVE_HELPER, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-B7p94Y0s.js";
|
|
21
|
-
import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, t as grantsLabel, u as approvalsSql } from "./hook-sql-
|
|
22
|
-
import { i as assignmentSql, n as ownershipSql } from "./ownership-
|
|
23
|
-
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-
|
|
21
|
+
import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, t as grantsLabel, u as approvalsSql } from "./hook-sql-CSUFnRn0.js";
|
|
22
|
+
import { i as assignmentSql, n as ownershipSql } from "./ownership-BvKT4DBj.js";
|
|
23
|
+
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-QFXiMHqJ.js";
|
|
24
24
|
import { p as scopeField } from "./tenancy-B5Xxt9Sc.js";
|
|
25
|
-
import { c as breakGlassKey, i as rbacScaffold, l as collectGrants, s as breakGlassHolder } from "./rbac-
|
|
26
|
-
import { t as supautilsRejections } from "./supautils-
|
|
27
|
-
import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, d as assemblePolicies, i as fieldViews, l as actorMayWriteCall, m as readOnlyActorPolicies, n as columnGrantSql, o as rowBranches, p as readOnlyActorKinds, r as columnRevokeSql, u as actorMayWriteSql } from "./fields-
|
|
25
|
+
import { c as breakGlassKey, i as rbacScaffold, l as collectGrants, s as breakGlassHolder } from "./rbac-BOVyTCI6.js";
|
|
26
|
+
import { t as supautilsRejections } from "./supautils-ym4X20ig.js";
|
|
27
|
+
import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, d as assemblePolicies, i as fieldViews, l as actorMayWriteCall, m as readOnlyActorPolicies, n as columnGrantSql, o as rowBranches, p as readOnlyActorKinds, r as columnRevokeSql, u as actorMayWriteSql } from "./fields-CKX-qjWb.js";
|
|
28
28
|
import { l as isFieldRelation } from "./resource-relations-Ck5sjYQR.js";
|
|
29
29
|
import { c as rootScope } from "./scopes-B-KX9EI8.js";
|
|
30
30
|
import { o as rootName, r as HELPERS, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
|
|
31
|
-
import { n as permissionHoldersSql } from "./resolve-names-
|
|
31
|
+
import { n as permissionHoldersSql } from "./resolve-names-B_no27Dh.js";
|
|
32
32
|
import { n as byKey } from "./compare-8SNJN-9U.js";
|
|
33
33
|
import { i as dateAt } from "./time-r0CKBm57.js";
|
|
34
34
|
import { _ as writeOutputFiles, a as isSeedsDirectory, d as pgDeltaPath, g as underSchemaDir, h as serviceRel, l as parseSplit, m as seedsMigration, n as dataMigrationFile, p as seedDeltaNote, r as driftOf, u as partPath } from "./output-files-8lfALMSU.js";
|
|
35
|
-
import { c as readSupabaseConfig, n as resolveSchemas } from "./supabase-schemas-
|
|
35
|
+
import { c as readSupabaseConfig, n as resolveSchemas } from "./supabase-schemas-DA28GP4N.js";
|
|
36
36
|
import { o as sqlFiles } from "./files-DAR51W3J.js";
|
|
37
37
|
import { n as MIGRATION_DIRS } from "./constants-PCJiir_3.js";
|
|
38
38
|
import { readFileSync } from "node:fs";
|
|
@@ -160,7 +160,7 @@ function unquote(name) {
|
|
|
160
160
|
}
|
|
161
161
|
function reasonOf(name) {
|
|
162
162
|
if (name === "permdock_custom_role_name_guard") return "customRoleWrites.roles: a tenant role cannot take a declared or shared role's name";
|
|
163
|
-
if (name === "permdock_custom_role_system_guard") return "customRoleWrites.roles: a signed-in caller cannot mark a role as a system role or rename one";
|
|
163
|
+
if (name === "permdock_custom_role_system_guard") return "customRoleWrites.roles: a signed-in caller cannot mark a tenant role as a system role or rename one";
|
|
164
164
|
if (name === "permdock_custom_role_cascade") return "customRoleWrites.roles: a rename or delete of a role carries its grants";
|
|
165
165
|
if (name.startsWith("permdock_sync_custom_role_guard")) return "customRoles.from.sync: a signed-in caller writes only entries they may hand out";
|
|
166
166
|
if (name.startsWith("permdock_sync_custom_role")) return "customRoles.from.sync: each write to the legacy table rebuilds the role's grants";
|
|
@@ -2312,6 +2312,84 @@ async function tablesFromProject(cwd) {
|
|
|
2312
2312
|
function withoutServedTargets(targets, keys) {
|
|
2313
2313
|
return targets.filter((target) => !(keys[target.table] ?? []).some((key) => target.columns.every((column, at) => key[at] === column)));
|
|
2314
2314
|
}
|
|
2315
|
+
// src/cli/rls/row-coverage.ts
|
|
2316
|
+
const ROW_GRANTEES = /* @__PURE__ */ new Set([
|
|
2317
|
+
"relation",
|
|
2318
|
+
"plan",
|
|
2319
|
+
"actor",
|
|
2320
|
+
"assurance",
|
|
2321
|
+
"inherit"
|
|
2322
|
+
]);
|
|
2323
|
+
function granteesOf(to) {
|
|
2324
|
+
return Array.isArray(to) ? to : [to];
|
|
2325
|
+
}
|
|
2326
|
+
/**
|
|
2327
|
+
* Coverage for a key whose row conditions are only string equalities in `where`
|
|
2328
|
+
* and relation grantees named after a scope. A plan or any other condition
|
|
2329
|
+
* leaves the key out: the helpers still cannot apply it.
|
|
2330
|
+
*/
|
|
2331
|
+
function rowConditionCoverage(policy) {
|
|
2332
|
+
const found = /* @__PURE__ */ new Map();
|
|
2333
|
+
const blocked = /* @__PURE__ */ new Set();
|
|
2334
|
+
for (const grant of [...policy.grants, ...policy.roles.flatMap((binding) => binding.grants)]) {
|
|
2335
|
+
if (grant.hosted !== void 0 || !grantHasRowConditions(grant)) continue;
|
|
2336
|
+
const parts = {
|
|
2337
|
+
equalities: [],
|
|
2338
|
+
relations: []
|
|
2339
|
+
};
|
|
2340
|
+
if (blocksCoverage(policy, grant, parts)) blocked.add(grant.permission.key);
|
|
2341
|
+
else {
|
|
2342
|
+
const list = found.get(grant.permission.key) ?? {
|
|
2343
|
+
equalities: [],
|
|
2344
|
+
relations: []
|
|
2345
|
+
};
|
|
2346
|
+
list.equalities.push(...parts.equalities);
|
|
2347
|
+
list.relations.push(...parts.relations);
|
|
2348
|
+
found.set(grant.permission.key, {
|
|
2349
|
+
equalities: [...new Set(list.equalities)],
|
|
2350
|
+
relations: [...new Set(list.relations)]
|
|
2351
|
+
});
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
for (const key of blocked) found.delete(key);
|
|
2355
|
+
return Object.fromEntries(found);
|
|
2356
|
+
}
|
|
2357
|
+
function blocksCoverage(policy, grant, out) {
|
|
2358
|
+
for (const grantee of granteesOf(grant.to)) {
|
|
2359
|
+
if (!ROW_GRANTEES.has(grantee.kind)) continue;
|
|
2360
|
+
if (grantee.kind !== "relation") return true;
|
|
2361
|
+
if (grantee.through !== void 0 || grantee.depth !== void 0 || !policy.scopes.some((scope) => scope.name === grantee.relation)) return true;
|
|
2362
|
+
out.relations.push(grantee.relation);
|
|
2363
|
+
}
|
|
2364
|
+
if (grant.check !== void 0 || grant.closure !== void 0 || !grant.portable || grant.fields !== void 0 || grant.purpose !== void 0 || grant.breakGlass !== void 0 || grant.validity !== void 0 || grant.requires !== void 0) return true;
|
|
2365
|
+
return grant.where !== void 0 && !equalitySql(grant.where, out.equalities);
|
|
2366
|
+
}
|
|
2367
|
+
function equalitySql(condition, out) {
|
|
2368
|
+
switch (condition.op) {
|
|
2369
|
+
case "eq":
|
|
2370
|
+
if (typeof condition.value !== "string") return false;
|
|
2371
|
+
out.push(`${condition.field} = '${condition.value.replaceAll("'", "''")}'`);
|
|
2372
|
+
return true;
|
|
2373
|
+
case "and":
|
|
2374
|
+
case "or": return condition.conditions.every((child) => equalitySql(child, out));
|
|
2375
|
+
case "not": return equalitySql(condition.condition, out);
|
|
2376
|
+
case "ne":
|
|
2377
|
+
case "gt":
|
|
2378
|
+
case "gte":
|
|
2379
|
+
case "lt":
|
|
2380
|
+
case "lte":
|
|
2381
|
+
case "contains":
|
|
2382
|
+
case "in":
|
|
2383
|
+
case "notIn":
|
|
2384
|
+
case "isNull":
|
|
2385
|
+
case "memberOf":
|
|
2386
|
+
case "related":
|
|
2387
|
+
case "opaque":
|
|
2388
|
+
case "sqlFunction":
|
|
2389
|
+
case "liveSession": return false;
|
|
2390
|
+
default: return condition;
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2315
2393
|
// src/cli/rls/generate.ts
|
|
2316
2394
|
function refused(output) {
|
|
2317
2395
|
return {
|
|
@@ -2388,6 +2466,7 @@ async function runRlsGenerate(given) {
|
|
|
2388
2466
|
keys: {
|
|
2389
2467
|
permissions: listPermissions(policy.vocabulary.permissions).map((leaf) => leaf.key),
|
|
2390
2468
|
rowConditions: [...policyRowConditionKeys(policy)],
|
|
2469
|
+
coverage: rowConditionCoverage(policy),
|
|
2391
2470
|
levels: levelKeys(policy),
|
|
2392
2471
|
renamed: Object.fromEntries(renamedKeys(policy.vocabulary.permissions))
|
|
2393
2472
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-9GAzSI7E.js";
|
|
2
2
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { c as generateFlags, f as policyFlag, i as dryRunFlag, n as dbUrl, r as dbUrlFlags, t as checkFlag } from "./flags-DQzNPxg1.js";
|
|
4
|
-
import { t as executeGenerate } from "./execute-
|
|
5
|
-
import { n as receiptRows } from "./pipeline-
|
|
4
|
+
import { t as executeGenerate } from "./execute-B_yY9xWV.js";
|
|
5
|
+
import { n as receiptRows } from "./pipeline-BMbLI2Sj.js";
|
|
6
6
|
// src/cli/commands/generate.ts
|
|
7
7
|
function concurrencyFlag(value) {
|
|
8
8
|
if (value === void 0 || value === "") return;
|
|
@@ -24,7 +24,7 @@ const generate = defineLeaf({
|
|
|
24
24
|
const db = await dbUrl(ctx, flags);
|
|
25
25
|
const policy = flags.policy !== void 0 && flags.policy !== "" ? flags.policy : ctx.config.policy;
|
|
26
26
|
if (flags.watch) {
|
|
27
|
-
const { watchGenerate } = await import("./watch-
|
|
27
|
+
const { watchGenerate } = await import("./watch-Cvc7eUPk.js");
|
|
28
28
|
return watchGenerate(ctx, {
|
|
29
29
|
...policy === void 0 ? {} : { policy },
|
|
30
30
|
only: flags.only,
|
|
@@ -11,17 +11,17 @@ import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.
|
|
|
11
11
|
import "./sources-C6Id63F8.js";
|
|
12
12
|
import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
|
|
13
13
|
import { l as parseSplit } from "./output-files-8lfALMSU.js";
|
|
14
|
-
import { f as orSql, g as branchClauses } from "./fields-
|
|
14
|
+
import { f as orSql, g as branchClauses } from "./fields-CKX-qjWb.js";
|
|
15
15
|
import { b as idTypeOf, f as subjectIdSql, g as parseMembershipsFlag, n as USER_ID_HELPER, x as scopeTypeOf, y as firstScopeType } from "./subject-B7p94Y0s.js";
|
|
16
16
|
import { a as customRolesOn, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
|
|
17
|
-
import { R as raiseSql, a as interactiveOnlyKeys, c as memoUserSql, g as memoHitList, q as checkSuspension, v as memoizedSetofSql, y as memoizes } from "./interactive-only-
|
|
18
|
-
import { i as graphSqlName } from "./names-
|
|
19
|
-
import { $ as graphIdsSql, B as apiKeyClaimSql, E as memoReadsSql, H as apiKeyUnlimitedSql, N as tokenScopesPlan, O as TOKEN_SCOPE_ALLOWS, P as memoReadTriggersSql, Q as closureDepths, R as API_KEY_ALLOWS, U as apiKeysPlan, a as tablelessResources, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, j as tokenScopeUnlimitedSql, k as isTokenScopesSetting, n as resolveVias, o as PERMISSION_HELPERS, t as checkSharedTables } from "./tables-
|
|
20
|
-
import { t as resolveNames } from "./resolve-names-
|
|
21
|
-
import { a as resolveAuthorize, o as assignableRoles, u as roleNames } from "./rbac-
|
|
22
|
-
import { a as tableFor } from "./compile-
|
|
23
|
-
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-
|
|
24
|
-
import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-
|
|
17
|
+
import { R as raiseSql, a as interactiveOnlyKeys, c as memoUserSql, g as memoHitList, q as checkSuspension, v as memoizedSetofSql, y as memoizes } from "./interactive-only-CylKSukS.js";
|
|
18
|
+
import { i as graphSqlName } from "./names-DwGleRKB.js";
|
|
19
|
+
import { $ as graphIdsSql, B as apiKeyClaimSql, E as memoReadsSql, H as apiKeyUnlimitedSql, N as tokenScopesPlan, O as TOKEN_SCOPE_ALLOWS, P as memoReadTriggersSql, Q as closureDepths, R as API_KEY_ALLOWS, U as apiKeysPlan, a as tablelessResources, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, j as tokenScopeUnlimitedSql, k as isTokenScopesSetting, n as resolveVias, o as PERMISSION_HELPERS, t as checkSharedTables } from "./tables-BwQvlpS4.js";
|
|
20
|
+
import { t as resolveNames } from "./resolve-names-B_no27Dh.js";
|
|
21
|
+
import { a as resolveAuthorize, o as assignableRoles, u as roleNames } from "./rbac-BOVyTCI6.js";
|
|
22
|
+
import { a as tableFor } from "./compile-EtZv2wc0.js";
|
|
23
|
+
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-QFXiMHqJ.js";
|
|
24
|
+
import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-BvKT4DBj.js";
|
|
25
25
|
// src/cli/rls/custom-role-sync.ts
|
|
26
26
|
/**
|
|
27
27
|
* `rls.customRoles.from.sync: 'trigger'`: after-row triggers on the legacy
|
package/dist/h3/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
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-
|
|
2
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
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-C_Lnc8Ec.js";
|
|
2
|
+
import { a as PermDock } from "../permdock-CHU1LZGq.js";
|
|
3
3
|
import { D as Policy, N as PolicyVocabulary, Or as Principal, rn as Snapshot } from "../policy-types-DuM3k5Ao.js";
|
|
4
|
-
import { a as ProtectTarget, n as FetchAdapterOptions, r as FetchProtect, t as ContextReader } from "../fetch-adapter-
|
|
4
|
+
import { a as ProtectTarget, n as FetchAdapterOptions, r as FetchProtect, t as ContextReader } from "../fetch-adapter-CdaSVKrt.js";
|
|
5
5
|
import { EventHandler, H3Event, H3EventContext, Middleware } from "h3";
|
|
6
6
|
type H3PermDockOptions<TUser = unknown> = FetchAdapterOptions<H3Event, TUser>;
|
|
7
7
|
/**
|
package/dist/h3/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
|
|
2
|
-
import { i as decorate } from "../bind-
|
|
3
|
-
import { t as fetchAdapter } from "../fetch-adapter-
|
|
2
|
+
import { i as decorate } from "../bind-2Cuy29LS.js";
|
|
3
|
+
import { t as fetchAdapter } from "../fetch-adapter-DXgza6EM.js";
|
|
4
4
|
// src/h3/create.ts
|
|
5
5
|
function createPermDock(policy, options) {
|
|
6
6
|
const adapter = fetchAdapter(policy, options, "h3", (event) => event.req);
|
|
@@ -103,4 +103,56 @@ function rowConditionMessage(policy, keys) {
|
|
|
103
103
|
return `${policy.table} policy '${policy.name}' calls the SQL helpers with ${keys.join(", ")}, whose grants carry row conditions the helpers do not check: the policy grants more than the application does`;
|
|
104
104
|
}
|
|
105
105
|
const ROW_CONDITION_FIX = "call permitted_<scope>_ids_by_permission('<key>') or permdock_has_permission('<key>'), which count only the allows without a row condition (a relationship grant never reaches a topic or a folder), or use a permission whose catalog entry has rowConditions: false";
|
|
106
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Whether `expression` shows `coverage`: each equality is `and`ed with the
|
|
108
|
+
* helper call, and each relation scope is read through `member_<scope>_ids`.
|
|
109
|
+
*/
|
|
110
|
+
function conditionShown(expression, key, coverage) {
|
|
111
|
+
if (coverage === void 0 || coverage.equalities.length === 0 && coverage.relations.length === 0) return false;
|
|
112
|
+
const equalities = coverage.equalities.length === 0 || whereConjoined(expression, key, coverage.equalities);
|
|
113
|
+
const relations = coverage.relations.every((scope) => expression.toLowerCase().includes(`member_${scope}_ids`));
|
|
114
|
+
return equalities && relations;
|
|
115
|
+
}
|
|
116
|
+
function whereConjoined(expression, key, equalities) {
|
|
117
|
+
if (equalities.length === 0) return false;
|
|
118
|
+
const text = sqlText(expression);
|
|
119
|
+
const needle = `'${key}'`;
|
|
120
|
+
return equalities.every((equality) => {
|
|
121
|
+
const eqAt = text.indexOf(sqlText(equality));
|
|
122
|
+
if (eqAt < 0) return false;
|
|
123
|
+
let from = 0;
|
|
124
|
+
let keyAt = text.indexOf(needle, from);
|
|
125
|
+
while (keyAt >= 0) {
|
|
126
|
+
if (joinedByAnd(text, keyAt, eqAt)) return true;
|
|
127
|
+
from = keyAt + needle.length;
|
|
128
|
+
keyAt = text.indexOf(needle, from);
|
|
129
|
+
}
|
|
130
|
+
return false;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function sqlText(value) {
|
|
134
|
+
return value.toLowerCase().replaceAll("\"", "").replaceAll(/'((?:[^']|'')*)'::[a-z_][a-z0-9_.]*/gu, "'$1'").replaceAll(/\s+/gu, " ").trim();
|
|
135
|
+
}
|
|
136
|
+
function joinedByAnd(text, a, b) {
|
|
137
|
+
const start = Math.min(a, b);
|
|
138
|
+
const end = Math.max(a, b);
|
|
139
|
+
let depth = 0;
|
|
140
|
+
let min = Number.POSITIVE_INFINITY;
|
|
141
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
142
|
+
if (text[index] === "(") depth += 1;
|
|
143
|
+
if (index >= start && index <= end) min = Math.min(min, depth);
|
|
144
|
+
if (text[index] === ")") depth -= 1;
|
|
145
|
+
}
|
|
146
|
+
depth = 0;
|
|
147
|
+
let and = false;
|
|
148
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
149
|
+
if (text[index] === "(") depth += 1;
|
|
150
|
+
if (index >= start && index <= end && depth === min) {
|
|
151
|
+
if (text.startsWith(" or ", index)) return false;
|
|
152
|
+
if (text.startsWith(" and ", index)) and = true;
|
|
153
|
+
}
|
|
154
|
+
if (text[index] === ")") depth -= 1;
|
|
155
|
+
}
|
|
156
|
+
return and;
|
|
157
|
+
}
|
|
158
|
+
export { conditionShown as a, helperTablePoliciesFromRows as c, callsHelper as i, rowConditionMessage as l, HELPER_TABLE_POLICIES_SQL as n, helperCallKeys as o, ROW_CONDITION_FIX as r, helperTablePolicies as s, HELPER_TABLES as t };
|
package/dist/hono/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
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-
|
|
2
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
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-C_Lnc8Ec.js";
|
|
2
|
+
import { a as PermDock } from "../permdock-CHU1LZGq.js";
|
|
3
3
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
4
4
|
import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-DuM3k5Ao.js";
|
|
5
5
|
import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
|
|
6
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
6
|
+
import { t as ServerAdapterOptions } from "../bind-Caffleoh.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,7 +1,7 @@
|
|
|
1
1
|
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
|
|
2
2
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
3
3
|
import { r as PermDockRevokedError } from "../errors-DOSkVeTC.js";
|
|
4
|
-
import { r as bindKernel } from "../bind-
|
|
4
|
+
import { r as bindKernel } from "../bind-2Cuy29LS.js";
|
|
5
5
|
import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
|
|
6
6
|
import { a as onRevoked, n as closeReason, r as guardIterable, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
|
|
7
7
|
import { Hono } from "hono";
|