permdock 0.31.0 → 0.34.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 +2 -2
- package/dist/{adoption-scan-9brJ_mUG.js → adoption-scan-BPW1eWy5.js} +1 -1
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.d.ts +3 -3
- package/dist/ai-sdk/index.js +3 -3
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +1 -1
- package/dist/{approval-chain-D97rgMoA.js → approval-chain-BEeExHpb.js} +15 -10
- package/dist/{approval-prompt-yNyhQqn8.d.ts → approval-prompt-CJvYBdja.d.ts} +1 -1
- package/dist/approvals/index.d.ts +3 -3
- package/dist/{arazzo-C0bltfjv.js → arazzo-BUXKjylF.js} +1 -1
- package/dist/{arazzo-Cs-3yoxR.js → arazzo-DqzmZG-x.js} +2 -2
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +1 -1
- package/dist/{audience-CARf-b-R.js → audience-B6DQ5wQu.js} +1 -1
- package/dist/authzen/index.d.ts +6 -6
- package/dist/authzen/index.js +1 -1
- package/dist/{automation-0VF1xe4o.d.ts → automation-BqUmdFfe.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-supabase/index.d.ts +57 -14
- package/dist/better-supabase/index.js +29 -20
- package/dist/{bind-zQacwAOg.d.ts → bind-Bwk9tt1z.d.ts} +7 -7
- package/dist/{bind-BYeoLJgN.js → bind-DPptdk31.js} +2 -2
- package/dist/{bsb-access-tags-B1TBUQLj.js → bsb-access-tags-Nv4nDQ2U.js} +20 -44
- package/dist/{bsb-action-keys-iKmZChtQ.js → bsb-action-keys-CYEREFMg.js} +1 -1
- package/dist/{budgets-Dpumu_Dt.js → budgets-hi-ecgEd.js} +3 -3
- package/dist/{build-instance-CFiegi_w.js → build-instance-DZEWYO-A.js} +1 -1
- package/dist/bundle-size-BRFeBvuv.js +1 -0
- package/dist/{bundle-size-Ddhv_H_v.js → bundle-size-DbXV65Ix.js} +2 -2
- package/dist/{capability-BPzseilU.d.ts → capability-qoD_jlcI.d.ts} +1 -1
- package/dist/{casbin-s6_zDJi1.js → casbin-CM9mWO1V.js} +1 -1
- package/dist/{casbin-DGsO-QmR.js → casbin-qEW6RfXA.js} +1 -1
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +4 -4
- package/dist/{challenge-CRB1X3Ry.js → challenge-E9sicsCA.js} +1 -1
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/{claims-size-BsSDVD5u.js → claims-size-BUhCWS88.js} +18 -3
- package/dist/claims-size-C6oKGuOM.js +1 -0
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/watch-worker.js +2 -2
- package/dist/cli/index.d.ts +6 -6
- package/dist/cli/index.js +3 -3
- package/dist/cli/plugins/app.d.ts +1 -1
- package/dist/cli/plugins/app.js +1 -1
- package/dist/cli/plugins/better-supabase.d.ts +1 -1
- package/dist/cli/plugins/openapi.d.ts +1 -1
- package/dist/cli/plugins/openapi.js +1 -1
- package/dist/cli/plugins/powersync.d.ts +1 -1
- package/dist/cli/plugins/powersync.js +1 -1
- package/dist/cli/plugins/rls.d.ts +2 -2
- package/dist/cli/plugins/rls.js +1 -1
- package/dist/cli/plugins/schemas.d.ts +1 -1
- package/dist/cli/plugins/schemas.js +1 -1
- package/dist/cli/plugins/scim.d.ts +2 -2
- package/dist/cli/plugins/supabase-hook.d.ts +2 -2
- package/dist/cli/plugins/supabase-hook.js +1 -1
- package/dist/cli/plugins/supabase.d.ts +3 -3
- package/dist/cli/plugins/supabase.js +2 -2
- package/dist/cli/plugins/ui.d.ts +1 -1
- package/dist/cli/plugins/ui.js +1 -1
- package/dist/{client-subject-BOPbpwgm.d.ts → client-subject-Dzo49nco.d.ts} +2 -2
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-fRv3j6sq.js → cloud-CNGblWX0.js} +2 -2
- package/dist/{codemod-DT0dMVdd.js → codemod-BtJFcsD7.js} +8 -7
- package/dist/{codemod-DsqEKP6A.js → codemod-Dlhxov9D.js} +14 -11
- package/dist/{collect-CCgmm5xN.js → collect-CE5wK0AX.js} +1 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-tG1zkSgX.d.ts → compile-DNgpHgcK.d.ts} +2 -2
- package/dist/{compile-DNVVdVWs.js → compile-nR1gQhXo.js} +10 -9
- package/dist/{completion-DrJkWgZa.js → completion-BIN9YXIe.js} +1 -1
- package/dist/{config-D8iWeV9k.js → config-7QvEq57a.js} +2 -2
- package/dist/{config-BaKkd6HB.js → config-CoYhD6ur.js} +1 -1
- package/dist/{config-report-uuD5eVEn.js → config-report-D_L1HXDb.js} +3 -3
- package/dist/{context-Ne0EdD45.js → context-D8tN3SZm.js} +1 -1
- package/dist/{context-BQHKgT1m.js → context-Nr3nknZX.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +2 -2
- package/dist/{core-C5yCD-Ls.js → core-DIUrkFNL.js} +5 -5
- package/dist/{core-bf8qgaZf.d.ts → core-DPuDmlbL.d.ts} +2 -2
- package/dist/{create-Cn5EpEez.d.ts → create-BKrKxipb.d.ts} +4 -4
- package/dist/{create-COQVXK6C.js → create-BMRnaZel.js} +3 -3
- package/dist/{create-nOWD3Joc.js → create-BRY0OtFV.js} +3 -3
- package/dist/{create-B7Xa4jSQ.d.ts → create-CdB9FCZh.d.ts} +7 -7
- package/dist/{create-DHA0fhmi.d.ts → create-CdbVXh5I.d.ts} +6 -6
- package/dist/{credentials-COT-cjnP.d.ts → credentials-Dl0-R2aB.d.ts} +2 -2
- package/dist/{custom-role-rebuild-BBKC7Bt1.js → custom-role-rebuild-wzN8pqDk.js} +5 -5
- package/dist/{define-permdock-DBgwTFi1.d.ts → define-permdock-4IkoNaB3.d.ts} +6 -6
- package/dist/{define-permdock-D7aKxIax.js → define-permdock-CO7YNrOF.js} +2 -2
- package/dist/{definition-options-9o8Hdww3.js → definition-options-DO0kIrB9.js} +7 -1
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-C_AWc0f0.d.ts → denied-text-CllTzVJM.d.ts} +1 -1
- package/dist/{describe-AdETpWsn.d.ts → describe-FT1oVN_o.d.ts} +1 -1
- package/dist/{diff-CW9eZy9X.js → diff-CS8ks9h3.js} +1 -1
- package/dist/{diff-COdwpP31.js → diff-CkSZF7LO.js} +2 -2
- package/dist/{doctor-C1T2G2mn.js → doctor-Bn5OPJMB.js} +131 -44
- package/dist/{doctor-Ch4VGl2q.js → doctor-C9lLeLp2.js} +2 -2
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +1 -1
- package/dist/{errors-COoiWqIs.d.ts → errors-BGosrHl8.d.ts} +1 -1
- package/dist/{evaluate-Dmd0bShm.js → evaluate-DNz6wMYv.js} +1 -1
- package/dist/{evaluations-GW9j_ARq.d.ts → evaluations-CaXNkxTp.d.ts} +3 -3
- package/dist/{evaluator-eager-CpVYslzY.js → evaluator-eager-BLNVbEAC.js} +1 -1
- package/dist/evaluator-zpeC7zel.js +2 -0
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +2 -2
- package/dist/{execute-BhWXiQAy.js → execute-DsHFIBuO.js} +4 -4
- package/dist/{explain-DRC9V5Qb.js → explain-D4ipf8IH.js} +1 -1
- package/dist/{explain-jg0KLCVt.js → explain-DISCeeYS.js} +2 -2
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +1 -1
- package/dist/{fetch-adapter-CU1DIkXu.js → fetch-adapter-BXQc4NoV.js} +1 -1
- package/dist/{fetch-adapter-CJncmsPg.d.ts → fetch-adapter-Dci9NnyZ.d.ts} +2 -2
- package/dist/{fields-y_PSRCyJ.js → fields-CwFej4gp.js} +3 -3
- package/dist/{from-snapshot-DGc9W4QU.js → from-snapshot-DZ4D2sLa.js} +14 -9
- package/dist/gen-CpS9JkCb.js +1 -0
- package/dist/{gen-CGjbD8I_.js → gen-Fi4GcvIY.js} +3 -3
- package/dist/{gen-kind-thoT0NYV.js → gen-kind-DR2-to9P.js} +1 -1
- package/dist/{generate-eor7vXGN.js → generate-BSD_eI61.js} +22 -17
- package/dist/{generate-vEW8Brg8.js → generate-QEHCJSyv.js} +3 -3
- package/dist/{generate-options-MJgn0dgl.js → generate-options-BZ2nqy28.js} +14 -13
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +2 -2
- package/dist/{helper-calls-DHvgN9tr.js → helper-calls-B5MOl99d.js} +1 -1
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +1 -1
- package/dist/{hook-sql-DJQ_yOEC.js → hook-sql-CbkH78FC.js} +267 -223
- package/dist/{hosted-Bkw3Oyh-.d.ts → hosted-BISipW6F.d.ts} +1 -1
- package/dist/{hosted-DZwCFrcy.js → hosted-D3USbpS6.js} +1 -1
- package/dist/{import-D_8tLF9g.js → import-Bz6IKoMM.js} +3 -3
- package/dist/{import-CGQIK3iN.js → import-DppjSugv.js} +1 -1
- package/dist/{index-DT3hOxA7.d.ts → index-BDJ2OZvV.d.ts} +34 -11
- package/dist/{index-Kj5S3IWE.d.ts → index-BF4IlvkT.d.ts} +4 -4
- package/dist/{index-DWmIuQLz.d.ts → index-BO5f180f.d.ts} +4 -4
- package/dist/{index-WOx7TBbj.d.ts → index-CWwWkz10.d.ts} +2 -2
- package/dist/{index-xShPsK8G.d.ts → index-Co_e22iJ.d.ts} +1 -1
- package/dist/{index-DPVeDtAO.d.ts → index-giCl-aQY.d.ts} +4 -4
- package/dist/index.d.ts +16 -16
- package/dist/index.js +13 -13
- package/dist/{init-C6te_dSg.js → init-BOYIObRF.js} +3 -3
- package/dist/{init-DN19mlwE.js → init-DJYSpo-H.js} +1 -1
- package/dist/inspect-functions-CwEAQpVF.js +34 -0
- package/dist/{instance-options-DQCiBBuz.d.ts → instance-options-hq5Cp2Ih.d.ts} +1 -1
- package/dist/{instance-snapshot-D9kjL37B.js → instance-snapshot-D03srwnf.js} +9 -8
- package/dist/{interactive-only-BjYwp9mm.js → interactive-only-Bbq9e61G.js} +27 -182
- package/dist/jwt/index.d.ts +4 -4
- package/dist/{kernel-C5akxw5n.js → kernel-DSnWVZ0O.js} +5 -5
- package/dist/{keys-qFqDoYeF.js → keys-U2V0maaq.js} +1 -1
- package/dist/kysely/index.d.ts +3 -3
- package/dist/{lazy-provider-CMgFAGf8.d.ts → lazy-provider-W8KwlWJU.d.ts} +1 -1
- package/dist/{lazy-provider-DNVjY4n3.js → lazy-provider-b8UHGi8P.js} +2 -2
- package/dist/{login-BYXaH_yT.js → login-Dv8TFykx.js} +1 -1
- package/dist/{login-CMzfsdm8.js → login-xgjt0a5o.js} +3 -3
- package/dist/{manager-chain-CStuYb7A.js → manager-chain-FggG63qD.js} +2 -2
- package/dist/{manifest-CowZuywo.js → manifest-BUeAHWDT.js} +45 -38
- package/dist/{manifest-CA3E0KP8.d.ts → manifest-BwhZ1s5b.d.ts} +71 -2
- package/dist/{manifest-DdNYR_pl.js → manifest-CIWOmdlP.js} +1 -1
- package/dist/{manifest-schema-CLbcbDz7.js → manifest-schema-N3v2RVL-.js} +68 -1
- package/dist/{may-use-4HzzgYJ3.js → may-use-ikNCnNgZ.js} +1 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +2 -2
- package/dist/measure-DZtly0oE.js +272 -0
- package/dist/membership-claim-sql-DGfhIn__.js +33 -0
- package/dist/{membership-filter-C7ZuhAqJ.js → membership-filter-Bz9QX6E9.js} +1 -1
- package/dist/memberships-4e6qi8Uv.js +1 -0
- package/dist/memberships-CNoAlsma.js +180 -0
- package/dist/{migrate-pg-lkbDu.js → migrate-BXk_rUmb.js} +2 -2
- package/dist/{model-BqHWwfcg.js → model-D0EKt-ED.js} +3 -3
- package/dist/names-DBxKx2bz.js +182 -0
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +12 -11
- package/dist/next/index.js +4 -3
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +1 -1
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-BP7YpJeF.js → openapi-Bfakk4cF.js} +1 -1
- package/dist/{openapi-document-_QSOtSKS.js → openapi-document-ZWpur4f1.js} +1 -1
- package/dist/{openapi-Dsh0MDSZ.js → openapi-g58VVrsc.js} +2 -2
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +3 -3
- package/dist/{output-Didy9Ys4.js → output-D4FLF3_v.js} +1 -1
- package/dist/{ownership-CG5_N8b5.js → ownership-DvmaGcup.js} +13 -9
- package/dist/{parse-local-manifest-B92rFWnk.d.ts → parse-local-manifest-AJWs3pkW.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-CJPIwU1T.js → permdock-JM9TKevZ.js} +14 -14
- package/dist/{permdock-BShHM8OJ.d.ts → permdock-V86uejcm.d.ts} +2 -2
- package/dist/{permissions-wEkTVr_I.js → permissions-xPyAmuXi.js} +1 -1
- package/dist/{pipeline-B4iyaOK7.js → pipeline-DCERGTTY.js} +2 -2
- package/dist/{plugin-DQJuZVl1.d.ts → plugin-BnvEp5tS.d.ts} +2 -2
- package/dist/{policy-BBvhhH9X.js → policy-CZBJDcTx.js} +2 -1
- package/dist/{policy-BUtwixSN.d.ts → policy-DZORR-Fw.d.ts} +1 -1
- package/dist/{policy-hnVT4MC4.js → policy-DoHkOOTQ.js} +1 -1
- package/dist/{policy-bundle-BIDV0DZF.js → policy-bundle-CsnNAo-n.js} +3 -3
- package/dist/{policy-from-catalog-_zwn1sNj.js → policy-from-catalog-BohzTN3J.js} +3 -3
- package/dist/{policy-types-CfW4X_yX.d.ts → policy-types-BnBZvh7N.d.ts} +50 -1
- package/dist/{postgrest-PQ3zAOD2.d.ts → postgrest-BG0ipED3.d.ts} +9 -2
- package/dist/{powersync-_2ElzOhQ.js → powersync-CTKfjnPT.js} +12 -12
- package/dist/{powersync-D7YfMHke.js → powersync-Cz3MUw6R.js} +1 -1
- package/dist/{powersync-DUvN9v5a.js → powersync-Dbpn-n0o.js} +1 -1
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{protected-action-BPN0NaRb.js → protected-action-DDYvU-9Z.js} +1 -1
- package/dist/{protected-action-DhCQ4bSe.d.ts → protected-action-aGL_gT4j.d.ts} +5 -5
- package/dist/{provider-D1vlNPWo.js → provider-BwqzED5h.js} +100 -52
- package/dist/{provider-1xqxLVEz.js → provider-NQwLSlgb.js} +2 -2
- package/dist/{provider-CMgFAGf8.d.ts → provider-W8KwlWJU.d.ts} +1 -1
- package/dist/{provider-store-Cf8HRNtb.js → provider-store-BizF6jyu.js} +2 -2
- package/dist/{provider-with-cpL9vRjC.js → provider-with-DtBgCCV_.js} +1 -1
- package/dist/{prune-config-5vtQpiLk.js → prune-config--x-cEF8G.js} +6 -6
- package/dist/{pull-BnxZmo3f.js → pull-BQELP7aV.js} +2 -2
- package/dist/pull-C_ZiPZ5X.js +1 -0
- package/dist/{push-Bu0uCkJg.js → push-D5so0ptb.js} +2 -2
- package/dist/{pushed-policy-DcvO8NXy.d.ts → pushed-policy-CQaXRDe3.d.ts} +1 -1
- package/dist/{pushed-policy-DSjSWEAl.js → pushed-policy-dm_hFstN.js} +1 -1
- package/dist/{quote-BKrTBbcH.js → quote-LNaBdCGA.js} +1 -1
- package/dist/{rbac-CwcucZPx.js → rbac-BRMnQ9Rl.js} +5 -4
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +3 -3
- package/dist/react/lazy.d.ts +6 -6
- package/dist/react/lazy.js +3 -3
- package/dist/react/provider-client-lazy.d.ts +1 -1
- package/dist/react/provider-client-lazy.js +1 -1
- 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 +5 -5
- package/dist/read-memberships-DVBitJZG.js +164 -0
- package/dist/{rename-CLoDRrbc.js → rename-BjP2CFUY.js} +5 -5
- package/dist/replay-Dg5-l7xu.d.ts +3 -0
- package/dist/report-DF0zUNut.js +1 -0
- package/dist/{report-BI_hek_d.js → report-XdCm1y_J.js} +76 -6
- package/dist/{request-context-BNVY3kZ1.js → request-context-CqqdiVp4.js} +1 -1
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-config-9NYYVc30.js → resolve-config-Cu_mE2wt.js} +1 -1
- package/dist/{resolve-names-CTji5IPe.js → resolve-names-xBg9s2IJ.js} +7 -6
- package/dist/{resolver-CuIY8aFD.js → resolver-C_a-bddD.js} +99 -15
- package/dist/{rls-UY6p6ztg.js → rls-BzCz7ZV0.js} +55 -3
- package/dist/{rls-files-CDZdTh8v.js → rls-files-Bu0O7cZ6.js} +1 -1
- package/dist/{rls-options-BgD-KZkm.d.ts → rls-options-f1wRhXSG.d.ts} +1 -1
- package/dist/{rls-BPHCyA5v.js → rls-rk-QH4fc.js} +22 -12
- package/dist/{rpc-D7G7IJDa.js → rpc-BQPa7tLP.js} +1 -1
- package/dist/{rpc-COnquydd.d.ts → rpc-DyCWVn6C.d.ts} +1 -1
- package/dist/run-BvtApZDp.js +1 -0
- package/dist/{run-C3ztA88m.js → run-DTz-e3Od.js} +3 -3
- package/dist/{run-ticket-Mmor5sYW.d.ts → run-ticket-mVPqm6M6.d.ts} +2 -2
- package/dist/{saas-DcqUkynn.js → saas-DSeazNrN.js} +3 -3
- package/dist/{scan-m5m1M6Qn.js → scan-Cn79IAJs.js} +1 -1
- package/dist/{schema-BpGuLrwk.js → schema-CbzVUpWv.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/seeds/index.d.ts +1 -1
- package/dist/{seeds-Cih1ztkf.d.ts → seeds-DLjPbhvM.d.ts} +1 -1
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +1 -1
- package/dist/{server-types-C2XX60aF.d.ts → server-types-BlMijUtb.d.ts} +8 -8
- package/dist/share-key-claims-CZGAeVqa.js +28 -0
- package/dist/{shared-C6_T7QUo.js → shared-DnVY767H.js} +2 -1
- package/dist/{sink-BQ_6K81r.d.ts → sink-DhrVLPSJ.d.ts} +2 -2
- package/dist/{size-l1pDHE2z.js → size-CY6rK6l9.js} +3 -3
- package/dist/{skills-BytzDi34.js → skills-BKrN1qej.js} +1 -1
- package/dist/{skills-CzhnDo-C.js → skills-oZ8Ng2e7.js} +1 -1
- package/dist/{snapshot-Ty0uk9wZ.js → snapshot-Dzi4LR6n.js} +8 -1
- package/dist/{snapshot-cache-DGvLQW0-.d.ts → snapshot-cache-CVYqOThu.d.ts} +1 -1
- package/dist/{snapshot-compact-yXFxZLPo.js → snapshot-compact-BWMLnIXK.js} +35 -4
- package/dist/{snapshot-evaluate-DSNj2rhV.js → snapshot-evaluate-C382Z1mQ.js} +1 -1
- package/dist/{snapshot-reads-BnAHiuoa.js → snapshot-reads-JxcUSUfW.js} +2 -2
- package/dist/{snapshot-size-DNY1MTsV.js → snapshot-size-D6ixbYvH.js} +1 -1
- package/dist/{snapshot-size-2fkXbCkP.js → snapshot-size-NklqBKcV.js} +1 -1
- 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 +2 -2
- package/dist/{sources-D5n28164.d.ts → sources-Bq7k7g34.d.ts} +7 -2
- package/dist/{sources-DnjJPGfb.js → sources-C6Id63F8.js} +2 -1
- package/dist/{src-HRYn4UFj.js → src-BXDohWNO.js} +154 -11
- package/dist/ssf/index.d.ts +3 -3
- package/dist/{standard-webhooks-Bnnrqa6d.d.ts → standard-webhooks-D6SPYjSQ.d.ts} +2 -2
- package/dist/{store-core-BdFcruPm.d.ts → store-core-Bq7Qc9QM.d.ts} +4 -4
- package/dist/{store-options-DpCQo0vB.js → store-options-DgOuhUSn.js} +4 -4
- package/dist/{stores-D6MIjN_-.d.ts → stores-Dn7TpQFa.d.ts} +5 -5
- package/dist/{stores-KpBCaY6c.js → stores-jgDndNHa.js} +1 -1
- package/dist/{subject-CrldGifz.js → subject-B7p94Y0s.js} +1 -1
- package/dist/{subject-cache-CnJcz2K_.d.ts → subject-cache-UKUgQCEX.d.ts} +3 -1
- package/dist/supabase/index.d.ts +36 -9
- package/dist/supabase/index.js +8 -7
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +4 -4
- package/dist/{supabase-CAswAUeb.js → supabase-BNPS-Gr1.js} +15 -1
- package/dist/{supabase-kWQlkrHw.js → supabase-DrazwRER.js} +14 -7
- package/dist/supabase-hook-D0Yzbl19.js +2 -0
- package/dist/{supabase-hook-C0LIaT7b.js → supabase-hook-t1HnQf8U.js} +11 -185
- package/dist/{supabase-schemas-BUFeyErz.js → supabase-schemas-_ubYYw9i.js} +10 -9
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +5 -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 +1 -1
- package/dist/table-reads-B7z40Yu-.js +766 -0
- package/dist/table-reads-Ci-ZVo5m.js +1 -0
- package/dist/{tables-sLA1CpuN.js → tables-Bxmf2beb.js} +108 -11
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +1 -1
- package/dist/tenant-check-DW0kbH-a.js +105 -0
- 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 +4 -4
- package/dist/testing/fixtures/index.js +41 -17
- package/dist/testing/index.d.ts +23 -23
- package/dist/testing/index.js +13 -13
- package/dist/testing/saas/index.d.ts +3 -3
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +2 -2
- package/dist/{type-helpers-CUmJFGV6.d.ts → type-helpers-CVN-p62O.d.ts} +1 -1
- package/dist/{types-vKKndyxx.d.ts → types-5cvjmHTG.d.ts} +1 -1
- package/dist/{types-DwoRXDvN.d.ts → types-BMKDvcXc.d.ts} +2 -2
- package/dist/{types-CIzXPPV-.d.ts → types-B_I8TBA9.d.ts} +2 -2
- package/dist/{types-h9W3CNC_.d.ts → types-BmTW35E5.d.ts} +4 -4
- package/dist/{types-BhBfMdQ5.d.ts → types-CDkJNA3a.d.ts} +3 -3
- package/dist/{types-euUv1wsO.d.ts → types-CgaGxF5q.d.ts} +1 -1
- package/dist/{types-BsRf5rKk.d.ts → types-CrUguLsE.d.ts} +2 -2
- package/dist/{types-BRECeQ2n.d.ts → types-DNOJRhyn.d.ts} +3 -3
- package/dist/{types-BKnUwgvx.d.ts → types-Dl2jRkyq.d.ts} +4 -4
- package/dist/{types-config-BiMM_zJ-.d.ts → types-config-CyawIkMF.d.ts} +2 -2
- package/dist/{types-CjZscT16.d.ts → types-gp1w86cV.d.ts} +4 -4
- package/dist/{types-run-N2ffLN_Z.d.ts → types-run-ByHuYUen.d.ts} +1 -1
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-DT6QK86a.js → usage-B8ca_Nj_.js} +2 -2
- package/dist/usage-CKTsomEq.js +1 -0
- package/dist/{usage-Dcbg6zu6.js → usage-Do7LQ4i4.js} +1 -1
- package/dist/{validation-error-P4Z9HUuP.d.ts → validation-error-BKgVVMc1.d.ts} +1 -1
- package/dist/{verify-DNERav8K.js → verify-ZojGAC3f.js} +12 -12
- package/dist/{version-cache-BzK8dwJy.js → version-cache-Ccrfu2A4.js} +6 -1
- package/dist/vue/index.d.ts +5 -5
- package/dist/vue/index.js +2 -2
- package/dist/{waiter-BqUxSRxq.d.ts → waiter-Bov7Cig6.d.ts} +2 -2
- package/dist/warm-BKD3FN6k.d.ts +16 -0
- package/dist/warm-BZ0ZwSmO.js +32 -0
- package/dist/{watch-fldErlRf.js → watch-D-5ztqN8.js} +1 -1
- package/dist/{watch-BsQ4n3NV.js → watch-EzX_aG73.js} +2 -2
- package/dist/watch-J1PfGMfb.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/{who-can-CGVpM3fZ.js → who-can-CIgYpEvy.js} +1 -1
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-D8WtzrB7.d.ts → wrap-CaAA3ubO.d.ts} +2 -2
- package/package.json +11 -11
- package/schemas/snapshot-v2.json +20 -0
- package/schemas/supabase-claims-v1.json +48 -2
- package/schemas/supabase-manifest-v1.json +137 -19
- package/skills/permdock-data/references/queries-and-rls.md +1 -1
- package/dist/bundle-size-DwZ4e1gu.js +0 -1
- package/dist/claims-size-B6j0Ff4Q.js +0 -1
- package/dist/evaluator-COmATWCr.js +0 -2
- package/dist/gen-CkUEZ5Z6.js +0 -1
- package/dist/platform-CSxTsLsr.js +0 -35
- package/dist/pull-CGncYZNZ.js +0 -1
- package/dist/read-memberships-BkePIa1F.js +0 -63
- package/dist/replay-BCOZifwx.d.ts +0 -3
- package/dist/report-BevPHMy6.js +0 -1
- package/dist/run-3ySqmufy.js +0 -1
- package/dist/supabase-hook-DXGg5bNn.js +0 -2
- package/dist/tenant-check-gL2miiaS.js +0 -31
- package/dist/usage-DdOFc5xq.js +0 -1
- package/dist/watch-eay1PztJ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as committedManifest, n as configuredTableReads, r as manifestTableReads, i as tableReads, a as withTableReads } from "./table-reads-B7z40Yu-.js";
|
|
@@ -5,15 +5,17 @@ import { c as rootScope, d as scopeList } from "./scopes-B-KX9EI8.js";
|
|
|
5
5
|
import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
|
|
6
6
|
import { r as relationCondition, t as inheritCondition } from "./grantee-conditions-Dob6QQAc.js";
|
|
7
7
|
import { l as partitionsOf, p as scopeField } from "./tenancy-B5Xxt9Sc.js";
|
|
8
|
-
import { a as delegatedScopeMap } from "./permdock-
|
|
8
|
+
import { a as delegatedScopeMap } from "./permdock-JM9TKevZ.js";
|
|
9
9
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
10
10
|
import { d as sqlTextArray, i as qualifySqlTable, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
|
|
11
11
|
import { d as restrictedRowsSql, i as scopeColumn, l as relationArmSql } from "./compile-BUKXrueE.js";
|
|
12
|
-
import { t as AUTHZ_VERSION_TABLE } from "./sources-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { t as AUTHZ_VERSION_TABLE } from "./sources-C6Id63F8.js";
|
|
13
|
+
import { t as compactMembershipsSql } from "./membership-claim-sql-DGfhIn__.js";
|
|
14
|
+
import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-LNaBdCGA.js";
|
|
15
|
+
import { C as tenantTypeOf, a as kindFilterSql, b as idTypeOf, c as roleKindSql, d as subjectClaimSql, f as subjectIdSql, i as keyTenantSql, m as userIdHelperSql, s as memberVia, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-B7p94Y0s.js";
|
|
16
|
+
import { i as allowEntry, n as GLOBAL_ROLES, o as rootName, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
|
|
17
|
+
import { B as rolesTableScope, C as sourceRows, E as sqlBody, F as customRolesSql, G as activeRowSql, H as trustedReaderGrants, I as hasCustomRoleChecksFor, J as grantPermissionSql, K as activeUserSql, L as perScope, M as userActive, N as globalRoleSource, O as instancesActive, P as currentKeyExpr, R as raiseSql, S as sourceIdOf, T as sourcesKeep, U as activeInstancesSql, V as storedTenant, W as activeMembershipSql, _ as memoWriteSql, b as scopedBody, c as memoUserSql, d as disabledColumn, f as functionBody, g as memoHitList, h as memberColumn, i as interactiveAllowsSql, k as keyTenantLine, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, p as hasBody, r as interactiveAllowsCall, s as memoGlobalUserSql, u as claimTenant, v as memoizedSetofSql, w as sourcesBodyOf, x as sourceFilters, y as memoizes, z as roleReadersSql } from "./interactive-only-Bbq9e61G.js";
|
|
18
|
+
import { S as scopeTable, _ as memberRoleOf, a as graphSqlText, b as restrictedHelper, d as linkHelper, f as memberForHelper, g as memberOfHelper, h as memberIdsHelper, i as graphSqlName, n as CLOSURE, o as hasMemberFor, p as memberForSources, r as graphHelper, s as hasMemberOf, u as isTeamScope, v as permittedForHelper, x as scopeSources, y as permittedIdsHelper } from "./names-DBxKx2bz.js";
|
|
17
19
|
import { n as byKey, t as byCodeUnit } from "./compare-8SNJN-9U.js";
|
|
18
20
|
import { createHash } from "node:crypto";
|
|
19
21
|
// src/cli/rls/graph.ts
|
|
@@ -1273,6 +1275,54 @@ drop trigger if exists "permdock_custom_role_name_guard" on ${target};
|
|
|
1273
1275
|
create trigger "permdock_custom_role_name_guard"
|
|
1274
1276
|
before insert or update on ${target}
|
|
1275
1277
|
for each row execute function ${fn}();
|
|
1278
|
+
${systemGuardSql(ctx, target, key)}`;
|
|
1279
|
+
}
|
|
1280
|
+
/** Postgres roles a client request runs as; any other role is trusted SQL. */
|
|
1281
|
+
const CLIENT_ROLES = [
|
|
1282
|
+
"anon",
|
|
1283
|
+
"anonymous",
|
|
1284
|
+
"authenticated"
|
|
1285
|
+
];
|
|
1286
|
+
/**
|
|
1287
|
+
* The name guard lets a row the `skip` column marks through, so only trusted
|
|
1288
|
+
* SQL may mark one: a security invoker trigger refuses a client role that sets
|
|
1289
|
+
* the column, or renames or moves a row that has it. A row created by trusted
|
|
1290
|
+
* SQL, such as an organization's seeded system roles, keeps it.
|
|
1291
|
+
*/
|
|
1292
|
+
function systemGuardSql(ctx, target, key) {
|
|
1293
|
+
const table = ctx.customRoles?.table;
|
|
1294
|
+
if (table?.skip === void 0 || table.tenant === void 0) return "";
|
|
1295
|
+
const fn = qualified(ctx, CUSTOM_ROLES.systemGuard);
|
|
1296
|
+
const skip = quoteIdent(table.skip);
|
|
1297
|
+
const tenant = quoteIdent(table.tenant);
|
|
1298
|
+
return `
|
|
1299
|
+
-- the application's roles table: only trusted SQL marks a role as a system role, or renames or moves one
|
|
1300
|
+
create or replace function ${fn}()
|
|
1301
|
+
returns trigger
|
|
1302
|
+
language plpgsql
|
|
1303
|
+
volatile
|
|
1304
|
+
security invoker
|
|
1305
|
+
set search_path = ''
|
|
1306
|
+
as $$
|
|
1307
|
+
begin
|
|
1308
|
+
if not ${`current_user::text = any(array[${CLIENT_ROLES.map(quoteLiteral).join(", ")}])`} then
|
|
1309
|
+
return new;
|
|
1310
|
+
end if;
|
|
1311
|
+
if (tg_op = 'INSERT' and coalesce(new.${skip}, false))
|
|
1312
|
+
or (tg_op = 'UPDATE' and (
|
|
1313
|
+
coalesce(new.${skip}, false) is distinct from coalesce(old.${skip}, false)
|
|
1314
|
+
or (coalesce(old.${skip}, false) and (${key} is distinct from old.${quoteIdent(table.key)}::text or new.${tenant} is distinct from old.${tenant}))
|
|
1315
|
+
)) then
|
|
1316
|
+
${raiseSql(" ", "42501", "'permdock: only trusted SQL writes a system role'", "system-role")}
|
|
1317
|
+
end if;
|
|
1318
|
+
return new;
|
|
1319
|
+
end;
|
|
1320
|
+
$$;
|
|
1321
|
+
revoke execute on function ${fn}() from public, anon, authenticated;
|
|
1322
|
+
drop trigger if exists "permdock_custom_role_system_guard" on ${target};
|
|
1323
|
+
create trigger "permdock_custom_role_system_guard"
|
|
1324
|
+
before insert or update on ${target}
|
|
1325
|
+
for each row execute function ${fn}();
|
|
1276
1326
|
`;
|
|
1277
1327
|
}
|
|
1278
1328
|
// src/cli/rls/custom-role-writes.ts
|
|
@@ -1721,7 +1771,7 @@ function memberBody(ctx, scope, type, roles) {
|
|
|
1721
1771
|
if (ctx.authorize !== "database") return sqlBody(` select distinct (m ->> 'id')::${type}
|
|
1722
1772
|
from (select ${membershipClaim(ctx)} as v) pdk_c
|
|
1723
1773
|
cross join lateral jsonb_array_elements(
|
|
1724
|
-
case jsonb_typeof(pdk_c.v) when 'array' then pdk_c.v else '[]'::jsonb end
|
|
1774
|
+
case jsonb_typeof(pdk_c.v) when 'array' then pdk_c.v when 'object' then ${compactMembershipsSql("pdk_c.v")} else '[]'::jsonb end
|
|
1725
1775
|
) m
|
|
1726
1776
|
where ${signedIn(ctx)}
|
|
1727
1777
|
and m ->> 'scope' = ${quoteLiteral(scope)}
|
|
@@ -2054,6 +2104,21 @@ function scopeHasHelper(scope) {
|
|
|
2054
2104
|
return permittedIdsHelper(scope).replace(/^permitted_/u, "permdock_").replace(/_ids$/u, "_has");
|
|
2055
2105
|
}
|
|
2056
2106
|
/**
|
|
2107
|
+
* `permdock_<root>_has_active(p_grant)`: the same test as
|
|
2108
|
+
* `permdock_<root>_has`, with the tenant read from the token. The answer
|
|
2109
|
+
* depends only on the caller's grants of that key in the active tenant.
|
|
2110
|
+
*/
|
|
2111
|
+
function scopeHasActiveHelper(scope) {
|
|
2112
|
+
return `${scopeHasHelper(scope)}_active`;
|
|
2113
|
+
}
|
|
2114
|
+
/**
|
|
2115
|
+
* The active tenant, or null when the claim is absent. An empty string is not
|
|
2116
|
+
* cast: `''::uuid` throws, and no tenant must answer false.
|
|
2117
|
+
*/
|
|
2118
|
+
function activeTenantSql(ctx, type) {
|
|
2119
|
+
return `nullif(${subjectClaimSql(ctx, ctx.tenantClaim)}, '')::${type}`;
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2057
2122
|
* `permitted_<scope>_id_array(p_grant)` for one scope: a policy writes
|
|
2058
2123
|
* `<column> = any(<array>)`, which an index on the column serves. The root
|
|
2059
2124
|
* scope also gets `permdock_<scope>_has(p_grant, p_tenant)`, one membership
|
|
@@ -2090,6 +2155,19 @@ as $$
|
|
|
2090
2155
|
select p_tenant = any(${array}(p_grant))
|
|
2091
2156
|
$$;
|
|
2092
2157
|
${grants(fn, `text, ${type}`)}`);
|
|
2158
|
+
const active = qualified(ctx, scopeHasActiveHelper(scope));
|
|
2159
|
+
chunks.push(`-- the same test for the tenant the token names; a shared function calls it with a literal key
|
|
2160
|
+
create or replace function ${active}(p_grant text)
|
|
2161
|
+
returns boolean
|
|
2162
|
+
language sql
|
|
2163
|
+
stable
|
|
2164
|
+
security invoker
|
|
2165
|
+
cost 1000${parallel}
|
|
2166
|
+
set search_path = ''
|
|
2167
|
+
as $$
|
|
2168
|
+
select ${fn}(p_grant, ${activeTenantSql(ctx, type)})
|
|
2169
|
+
$$;
|
|
2170
|
+
${grants(active, "text")}`);
|
|
2093
2171
|
}
|
|
2094
2172
|
return chunks.join("\n");
|
|
2095
2173
|
}
|
|
@@ -2254,7 +2332,7 @@ begin
|
|
|
2254
2332
|
return coalesce((
|
|
2255
2333
|
select to_jsonb(v.version) = (c.j -> 'authz_ver')
|
|
2256
2334
|
and coalesce(c.j -> 'memberships_truncated', 'false'::jsonb) <> 'true'::jsonb
|
|
2257
|
-
and jsonb_typeof(c.j -> 'memberships')
|
|
2335
|
+
and jsonb_typeof(c.j -> 'memberships') in ('array', 'object')
|
|
2258
2336
|
from ${version} v
|
|
2259
2337
|
cross join (select auth.jwt() as j) c
|
|
2260
2338
|
where v.user_id = ${subjectIdSql(ctx)}
|
|
@@ -2527,7 +2605,7 @@ function memoBody(ctx, scope, type, body) {
|
|
|
2527
2605
|
memo: {
|
|
2528
2606
|
type,
|
|
2529
2607
|
scope,
|
|
2530
|
-
user: memoUserSql(ctx, subjectIdSql(ctx)),
|
|
2608
|
+
user: scope === "global" ? memoGlobalUserSql(ctx, subjectIdSql(ctx)) : memoUserSql(ctx, subjectIdSql(ctx)),
|
|
2531
2609
|
...ctx.memo === void 0 ? {} : { api: ctx.memo }
|
|
2532
2610
|
}
|
|
2533
2611
|
};
|
|
@@ -2553,7 +2631,9 @@ function grantBodies(ctx) {
|
|
|
2553
2631
|
};
|
|
2554
2632
|
const allows = ceiling(set ? "ids.grant_key" : "p_grant", true);
|
|
2555
2633
|
const keyTenant = keys === void 0 ? "" : ` and ${keyTenantSql(ctx, void 0) ?? "true"}`;
|
|
2556
|
-
const
|
|
2634
|
+
const delegated = delegatedGlobalSql(ctx);
|
|
2635
|
+
const hasCeiling = ceiling(set ? "g.grant_key" : "p_grant", false);
|
|
2636
|
+
const hasAllows = hasCeiling === void 0 ? delegated : delegated === void 0 ? hasCeiling : `${hasCeiling} and ${delegated}`;
|
|
2557
2637
|
return {
|
|
2558
2638
|
has: memoBody(ctx, "global", "boolean", sqlBody(hasAllows === void 0 ? hasBody(ctx) : set ? ` select g.grant_key
|
|
2559
2639
|
from (
|
|
@@ -2583,7 +2663,8 @@ function forUserContext(ctx) {
|
|
|
2583
2663
|
return {
|
|
2584
2664
|
...unkeyed,
|
|
2585
2665
|
subjectId: "p_user",
|
|
2586
|
-
tenants: "all"
|
|
2666
|
+
tenants: "all",
|
|
2667
|
+
namedUser: true
|
|
2587
2668
|
};
|
|
2588
2669
|
}
|
|
2589
2670
|
// src/cli/rls/ownership-names.ts
|
|
@@ -3241,6 +3322,22 @@ ${grantsSql(fn, "text", anonExecute)}`);
|
|
|
3241
3322
|
chunks.push(`-- the permission keys the caller holds on one ${scope.name}: what permdock_has_permission or permitted_${scope.name}_ids_by_permission answers for each key, in one call
|
|
3242
3323
|
${keysFunction(keysFn, `p_id ${type}`, keysBody(scope.name, caller, false), grantsSql(keysFn, type, anonExecute), parallel)}
|
|
3243
3324
|
${keysFunction(keysFn, `p_id ${type}, p_keys text[]`, keysBody(scope.name, caller, true), grantsSql(keysFn, `${type}, text[]`, anonExecute), parallel)}`);
|
|
3325
|
+
if (rootScope(ctx.scopes) === scope.name) {
|
|
3326
|
+
const activeName = checkName(`${permissionKeysHelper(scope.name)}_active`);
|
|
3327
|
+
const active = qualified(ctx, activeName);
|
|
3328
|
+
chunks.push(`-- which of p_keys the caller holds on the tenant the token names
|
|
3329
|
+
create or replace function ${active}(p_keys text[])
|
|
3330
|
+
returns setof text
|
|
3331
|
+
language sql
|
|
3332
|
+
stable
|
|
3333
|
+
security invoker
|
|
3334
|
+
cost 1000${parallel ? "\nparallel safe" : ""}
|
|
3335
|
+
set search_path = ''
|
|
3336
|
+
as $$
|
|
3337
|
+
select ${keysFn}(${activeTenantSql(ctx, type)}, p_keys)
|
|
3338
|
+
$$;
|
|
3339
|
+
${grantsSql(active, "text[]", anonExecute)}`);
|
|
3340
|
+
}
|
|
3244
3341
|
chunks.push(`-- with p_conditioned true, also the instances a conditioned allow reaches, minus only unconditional denies: the caller applies the row condition
|
|
3245
3342
|
${byPermission(fn, "p_permission text, p_conditioned boolean", scope.name, "", true)}
|
|
3246
3343
|
${grantsSql(fn, "text, boolean", anonExecute)}`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-
|
|
1
|
+
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-BlMijUtb.js";
|
|
2
2
|
import { a as OperationInput, t as Operation } from "../operations-DaEoGpMV.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
3
|
+
import { a as PermDock } from "../permdock-V86uejcm.js";
|
|
4
4
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
5
|
-
import { D as Policy,
|
|
6
|
-
import { a as ProtectTarget, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-
|
|
5
|
+
import { D as Policy, N as PolicyVocabulary, Or as Principal, rn as Snapshot } from "../policy-types-BnBZvh7N.js";
|
|
6
|
+
import { a as ProtectTarget, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-Dci9NnyZ.js";
|
|
7
7
|
import { RequestMiddleware, RequestMiddlewareAfterServer, createMiddleware } from "@tanstack/react-start";
|
|
8
8
|
type TanStackStartPermDockOptions<TUser = unknown> = FetchAdapterOptions<Request, TUser>;
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
|
|
2
|
-
import { t as fetchAdapter } from "../fetch-adapter-
|
|
2
|
+
import { t as fetchAdapter } from "../fetch-adapter-BXQc4NoV.js";
|
|
3
3
|
import { createMiddleware } from "@tanstack/react-start";
|
|
4
4
|
// src/tanstack-start/create.ts
|
|
5
5
|
function createPermDock(policy, options) {
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
2
|
+
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
|
+
import { i as tableNames } from "./tables-Bxmf2beb.js";
|
|
4
|
+
import { r as compileGrants } from "./compile-nR1gQhXo.js";
|
|
5
|
+
import { i as buildContext, n as isRefusal, t as generateOptions } from "./generate-options-BZ2nqy28.js";
|
|
6
|
+
// src/cli/rls/key-reasons.ts
|
|
7
|
+
/** A grant key written as a condition group (`k#1`) or a level (`k@own`). */
|
|
8
|
+
function isConditionKey(permission, grantKey) {
|
|
9
|
+
return grantKey.startsWith(`${permission}#`) || grantKey.startsWith(`${permission}@`);
|
|
10
|
+
}
|
|
11
|
+
/** Why `row` is not an unconditional allow of its own key, or `undefined`. */
|
|
12
|
+
function whyNot(row, conditioned) {
|
|
13
|
+
const holder = `role ${row.role} on ${row.scope}`;
|
|
14
|
+
if (row.effect === "deny") return `${holder} denies it`;
|
|
15
|
+
if (row.grantKey !== row.permission) return isConditionKey(row.permission, row.grantKey) ? `${holder} grants it under a condition (grant key ${row.grantKey})` : `${holder} grants it through another key (${row.grantKey})`;
|
|
16
|
+
if (conditioned.has(row.grantKey)) return `${holder} grants it under a row condition or a validity window`;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Reads the compiled grants of `policy` and sorts each permission key into the
|
|
20
|
+
* ones the by-permission helper answers like the plain one, and the ones it
|
|
21
|
+
* does not, with the first grant that decides it.
|
|
22
|
+
*/
|
|
23
|
+
function keyReasons(config, policy, cwd) {
|
|
24
|
+
const generate = {
|
|
25
|
+
cwd,
|
|
26
|
+
config,
|
|
27
|
+
target: "sql",
|
|
28
|
+
dialect: config.rls?.dialect ?? "supabase",
|
|
29
|
+
rbac: false,
|
|
30
|
+
check: false,
|
|
31
|
+
skipClosures: true,
|
|
32
|
+
inlineFunctions: false,
|
|
33
|
+
io: {
|
|
34
|
+
stdout: () => void 0,
|
|
35
|
+
stderr: () => void 0
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const options = generateOptions(generate);
|
|
39
|
+
if (isRefusal(options)) throw new CliError("usage", options.refusal, { code: "invalid_value" });
|
|
40
|
+
const built = buildContext(generate, policy, options);
|
|
41
|
+
if (isRefusal(built)) throw new CliError("usage", built.refusal, { code: "invalid_value" });
|
|
42
|
+
const compiled = compileGrants(policy, built.ctx, tableNames(config.rls?.tables), [], true);
|
|
43
|
+
const found = /* @__PURE__ */ new Map();
|
|
44
|
+
const ok = /* @__PURE__ */ new Set();
|
|
45
|
+
for (const row of compiled.rolePermissions) {
|
|
46
|
+
ok.add(row.permission);
|
|
47
|
+
const why = whyNot(row, compiled.conditionedKeys);
|
|
48
|
+
if (why === void 0) continue;
|
|
49
|
+
const entry = found.get(row.permission);
|
|
50
|
+
const replace = entry === void 0 || row.effect === "deny" && !entry.deny;
|
|
51
|
+
found.set(row.permission, {
|
|
52
|
+
count: (entry?.count ?? 0) + 1,
|
|
53
|
+
first: replace ? why : entry.first,
|
|
54
|
+
deny: replace ? row.effect === "deny" : entry.deny
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const reasons = new Map([...found].map(([key, { count, first }]) => [key, count === 1 ? first : `${first}; ${String(count - 1)} more grants differ`]));
|
|
58
|
+
return {
|
|
59
|
+
swappable: new Set([...ok].filter((key) => !reasons.has(key))),
|
|
60
|
+
reasons
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** The sentence for `key`, which `reasons` may not know. */
|
|
64
|
+
function keyReason(reasons, key) {
|
|
65
|
+
return reasons.reasons.get(key) ?? (reasons.swappable.has(key) ? "every grant of it is unconditional" : "the policy declares no grant of it");
|
|
66
|
+
}
|
|
67
|
+
/** `keyReasons`, or `undefined` for a policy or config the generator refuses. */
|
|
68
|
+
function tryKeyReasons(config, policy, cwd) {
|
|
69
|
+
try {
|
|
70
|
+
return keyReasons(config, policy, cwd);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
if (error instanceof CliError) return;
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// src/cli/sql/tenant-check.ts
|
|
77
|
+
/** The `sval` of each `String` node in a parse-tree list. */
|
|
78
|
+
function svals(list) {
|
|
79
|
+
return Array.isArray(list) ? list.flatMap((item) => isRecord(item) && isRecord(item["String"]) && typeof item["String"]["sval"] === "string" ? [item["String"]["sval"]] : []) : [];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* `<column> in (select <schema>.permitted_<scope>_ids('<key>'))`, read from the
|
|
83
|
+
* node.
|
|
84
|
+
*/
|
|
85
|
+
function tenantCheck(expr, helper) {
|
|
86
|
+
const link = isRecord(expr) ? expr["SubLink"] : void 0;
|
|
87
|
+
if (!isRecord(link) || link["subLinkType"] !== "ANY_SUBLINK") return;
|
|
88
|
+
const test = link["testexpr"];
|
|
89
|
+
const ref = isRecord(test) ? test["ColumnRef"] : void 0;
|
|
90
|
+
const column = isRecord(ref) ? svals(ref["fields"]) : [];
|
|
91
|
+
const select = isRecord(link["subselect"]) ? link["subselect"]["SelectStmt"] : void 0;
|
|
92
|
+
if (column.length !== 1 || !isRecord(select) || select["fromClause"] !== void 0) return;
|
|
93
|
+
const targets = Array.isArray(select["targetList"]) ? select["targetList"] : [];
|
|
94
|
+
const target = targets.length === 1 && isRecord(targets[0]) ? targets[0]["ResTarget"] : void 0;
|
|
95
|
+
const call = isRecord(target) && isRecord(target["val"]) ? target["val"]["FuncCall"] : void 0;
|
|
96
|
+
if (!isRecord(call) || svals(call["funcname"]).join(".") !== helper) return;
|
|
97
|
+
const args = Array.isArray(call["args"]) ? call["args"] : [];
|
|
98
|
+
const constant = args.length === 1 && isRecord(args[0]) ? args[0]["A_Const"] : void 0;
|
|
99
|
+
const value = isRecord(constant) && isRecord(constant["sval"]) ? constant["sval"]["sval"] : void 0;
|
|
100
|
+
return typeof value === "string" && column[0] !== void 0 ? {
|
|
101
|
+
column: column[0],
|
|
102
|
+
key: value
|
|
103
|
+
} : void 0;
|
|
104
|
+
}
|
|
105
|
+
export { tryKeyReasons as a, keyReasons as i, tenantCheck as n, keyReason as r, svals as t };
|
package/dist/terminal/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as ApprovalStore } from "../types-
|
|
3
|
-
import { a as ProblemDetails, t as ApprovalHint } from "../errors-
|
|
4
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
5
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal, ir as Decision, qt as Instant } from "../policy-types-BnBZvh7N.js";
|
|
2
|
+
import { m as ApprovalStore } from "../types-5cvjmHTG.js";
|
|
3
|
+
import { a as ProblemDetails, t as ApprovalHint } from "../errors-BGosrHl8.js";
|
|
4
|
+
import { t as InstanceOptions } from "../instance-options-hq5Cp2Ih.js";
|
|
5
|
+
import { a as PermDock } from "../permdock-V86uejcm.js";
|
|
6
6
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
7
7
|
type TokenSourceName = "device" | "keychain" | "env" | "ci-oidc";
|
|
8
8
|
type TokenSource = TokenSourceName | {
|
package/dist/terminal/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { l as storedApprovalToken, s as resumeDecision } from "../helpers-COh0lLc1.js";
|
|
2
|
-
import { u as withApp } from "../permdock-
|
|
3
|
-
import { n as resolveOrNull, t as buildInstance } from "../build-instance-
|
|
2
|
+
import { u as withApp } from "../permdock-JM9TKevZ.js";
|
|
3
|
+
import { n as resolveOrNull, t as buildInstance } from "../build-instance-DZEWYO-A.js";
|
|
4
4
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
5
5
|
import { n as resourceRef } from "../resource-ref-BiQtFK-I.js";
|
|
6
6
|
import { r as isSubject } from "../subject-DkxY-AhF.js";
|
|
7
7
|
import { a as refreshCredential, o as revokeCredential, s as runDeviceFlow, t as TERMINAL_TIMEOUT_MS } from "../device-f3JEnqa0.js";
|
|
8
|
-
import { i as expandSnapshot } from "../snapshot-compact-
|
|
8
|
+
import { i as expandSnapshot } from "../snapshot-compact-BWMLnIXK.js";
|
|
9
9
|
import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
|
|
10
10
|
import { i as writeCredentials, n as deleteCredentials, r as readCredentials } from "../storage-BhGDhsXm.js";
|
|
11
11
|
import { h as secondsAt } from "../time-r0CKBm57.js";
|
package/dist/testing/core.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-
|
|
1
|
+
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-DPuDmlbL.js";
|
|
2
2
|
export { type DescribePolicyConfig, type MatrixCell, type MatrixOutcome, type OrmParityCase, type OrmParityOptions, type OrmParityReport, type OrmParityRunInput, type OrmParityScenario, type PolicyMatrixCell, type PolicyMatrixReport, type RlsDbOutcome, type RlsFieldsOutcome, type RlsParityCase, type RlsParityFixture, type RlsParityOptions, type RlsParityReport, type RlsParitySubject, type RlsQueryFn, type RlsQueryResult, policyMatrix, testOrmParity, testRlsParity };
|
package/dist/testing/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as policyMatrix, t as testOrmParity, n as testRlsParity } from "../core-
|
|
1
|
+
export { r as policyMatrix, t as testOrmParity, n as testRlsParity } from "../core-DIUrkFNL.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as CatalogDocument } from "../../types-CbJ5mxXv.js";
|
|
2
|
-
import { i as SupabaseManifest } from "../../manifest-
|
|
3
|
-
import { rt as MemberEntry } from "../../policy-types-
|
|
4
|
-
import { r as SubjectRecord } from "../../subject-cache-
|
|
5
|
-
import { i as SupabaseRpcClient } from "../../postgrest-
|
|
2
|
+
import { i as SupabaseManifest } from "../../manifest-BwhZ1s5b.js";
|
|
3
|
+
import { rt as MemberEntry } from "../../policy-types-BnBZvh7N.js";
|
|
4
|
+
import { r as SubjectRecord } from "../../subject-cache-UKUgQCEX.js";
|
|
5
|
+
import { i as SupabaseRpcClient } from "../../postgrest-BG0ipED3.js";
|
|
6
6
|
type PostgrestFixtureOptions = {
|
|
7
7
|
/** The users `subject_for` knows, by id. An unknown user answers `null`. */
|
|
8
8
|
readonly subjects: Readonly<Record<string, SubjectRecord>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as parseCatalog } from "../../parse-CUqZ_lLC.js";
|
|
2
|
-
import { n as parseSupabaseManifest } from "../../manifest-
|
|
2
|
+
import { n as parseSupabaseManifest } from "../../manifest-CIWOmdlP.js";
|
|
3
3
|
// src/testing/fixtures/better-supabase.catalog.json
|
|
4
4
|
var better_supabase_catalog_default = {
|
|
5
5
|
$schema: "https://permdock.com/schemas/catalog-v2.json",
|
|
@@ -786,60 +786,84 @@ var better_supabase_manifest_default = {
|
|
|
786
786
|
{
|
|
787
787
|
"table": "public.contacts",
|
|
788
788
|
"share": "row",
|
|
789
|
-
"rules": ["unknown"]
|
|
789
|
+
"rules": ["unknown"],
|
|
790
|
+
"reason": "row level security is on and no permissive select policy applies to authenticated or public, so the table is not read through PostgREST by a signed-in role; inspect does not read grants, so a table grant is not checked"
|
|
790
791
|
},
|
|
791
792
|
{
|
|
792
793
|
"table": "public.customers",
|
|
793
794
|
"share": "row",
|
|
794
|
-
"rules": ["unknown"]
|
|
795
|
+
"rules": ["unknown"],
|
|
796
|
+
"reason": "row level security is on and no permissive select policy applies to authenticated or public, so the table is not read through PostgREST by a signed-in role; inspect does not read grants, so a table grant is not checked"
|
|
795
797
|
},
|
|
796
798
|
{
|
|
797
799
|
"table": "public.datetime_preferences",
|
|
798
800
|
"share": "row",
|
|
799
|
-
"rules": ["owner"]
|
|
800
|
-
|
|
801
|
-
{
|
|
802
|
-
"table": "public.memberships",
|
|
803
|
-
"share": "row",
|
|
804
|
-
"rules": ["unknown"]
|
|
801
|
+
"rules": ["owner"],
|
|
802
|
+
"reason": "policy datetime_preferences_own_read in supabase/schemas/public/tables/datetime_preferences.sql is an owner rule: it calls auth.uid() and reads column user_id, so a row is read by the user it names, not by a tenant grant"
|
|
805
803
|
},
|
|
806
804
|
{
|
|
807
805
|
"table": "public.organization_features",
|
|
808
806
|
"share": "row",
|
|
809
|
-
"rules": ["unknown"]
|
|
807
|
+
"rules": ["unknown"],
|
|
808
|
+
"reason": "row level security is on and no permissive select policy applies to authenticated or public (policies: organization_features_auth_admin_read), so the table is not read through PostgREST by a signed-in role; inspect does not read grants, so a table grant is not checked"
|
|
810
809
|
},
|
|
811
810
|
{
|
|
812
811
|
"table": "public.organization_memberships",
|
|
813
812
|
"share": "row",
|
|
814
|
-
"rules": ["owner", "restrictive"]
|
|
813
|
+
"rules": ["owner", "restrictive"],
|
|
814
|
+
"reason": "policy organization_memberships_read in supabase/schemas/public/tables/organization_memberships.sql is an owner rule: it calls auth.uid(), better_supabase.member_organization_ids() and reads column user_id, organization_id, so a row is read by the user it names, not by a tenant grant; restrictive policy bsb_tenant_scope_select in supabase/schemas/900_better_supabase_004_memberships.sql reads column organization_id, user_id, so the rows it hides differ per row, not per tenant"
|
|
815
815
|
},
|
|
816
816
|
{
|
|
817
817
|
"table": "public.organizations",
|
|
818
818
|
"share": "row",
|
|
819
|
-
"rules": ["condition"]
|
|
819
|
+
"rules": ["condition"],
|
|
820
|
+
"reason": "policy organizations_public_read in supabase/schemas/public/tables/organizations.sql is a row condition: it calls none and reads no column, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
820
821
|
},
|
|
821
822
|
{
|
|
822
823
|
"table": "public.quotes",
|
|
823
824
|
"share": "row",
|
|
824
|
-
"rules": ["condition"]
|
|
825
|
+
"rules": ["condition"],
|
|
826
|
+
"reason": "policy quotes_select in supabase/schemas/public/policies/permdock.sql is a row condition: it calls permdock.permitted_organization_ids(), permdock.permitted_customer_ids() and reads column organization_id, customer_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
825
827
|
},
|
|
826
828
|
{
|
|
827
829
|
"table": "public.role_permissions",
|
|
828
830
|
"share": "row",
|
|
829
831
|
"permissions": ["roles.manage"],
|
|
830
|
-
"rules": ["condition"]
|
|
832
|
+
"rules": ["condition"],
|
|
833
|
+
"reason": "policy role_permissions_manage in supabase/schemas/public/tables/role_permissions.sql is a row condition: it calls permdock.permitted_organization_ids_by_permission() and reads column r.id, role_id, r.organization_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
831
834
|
},
|
|
832
835
|
{
|
|
833
836
|
"table": "public.roles",
|
|
834
837
|
"share": "row",
|
|
835
|
-
"rules": ["condition"]
|
|
838
|
+
"rules": ["condition"],
|
|
839
|
+
"reason": "policy roles_read_members in supabase/schemas/public/tables/roles.sql is a row condition: it calls permdock.member_organization_ids() and reads column organization_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
836
840
|
},
|
|
837
841
|
{
|
|
838
842
|
"table": "public.staff",
|
|
839
843
|
"share": "row",
|
|
840
|
-
"rules": ["form"]
|
|
844
|
+
"rules": ["form"],
|
|
845
|
+
"reason": "policy staff_select in supabase/schemas/public/policies/permdock.sql uses permdock.permitted_organization_ids inside a larger expression, not as \"<column> in (select permdock.permitted_organization_ids('<key>'))\"; key staff.list: every grant of it is unconditional; key staff.read: every grant of it is unconditional"
|
|
841
846
|
}
|
|
842
|
-
]
|
|
847
|
+
],
|
|
848
|
+
"sharedFunctions": [],
|
|
849
|
+
"tenantPureHelpers": [{
|
|
850
|
+
"name": "permdock.permdock_organization_has",
|
|
851
|
+
"keyArgument": "p_grant",
|
|
852
|
+
"keyPosition": 0,
|
|
853
|
+
"tenantArgument": "p_tenant"
|
|
854
|
+
}, {
|
|
855
|
+
"name": "permdock.permitted_organization_permission_keys",
|
|
856
|
+
"keyArgument": "p_keys",
|
|
857
|
+
"keyPosition": 1,
|
|
858
|
+
"tenantArgument": "p_id"
|
|
859
|
+
}],
|
|
860
|
+
"permissionFilters": [{
|
|
861
|
+
"name": "permdock.permdock_organization_has_active",
|
|
862
|
+
"keyPosition": 0
|
|
863
|
+
}, {
|
|
864
|
+
"name": "permdock.permitted_organization_permission_keys_active",
|
|
865
|
+
"keyPosition": 0
|
|
866
|
+
}]
|
|
843
867
|
},
|
|
844
868
|
decidingColumns: [
|
|
845
869
|
"public.contacts.customer_id",
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Ct as WhereCompiler, D as Policy,
|
|
2
|
-
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-
|
|
1
|
+
import { Ar as Subject, Ct as WhereCompiler, D as Policy, Dr as Membership, G as CredentialVerifier, Or as Principal, X as DecisionSink, Y as DecisionProvider, Z as EntitlementSource, _t as TokenSigner, bn as DeliveryChannel, ct as RelationSource, it as MembershipSource, lt as SettingsSource, mt as SubjectResolver, nt as LimitStore, q as CustomRoleSource, rn as Snapshot, ut as SnapshotSource, vt as TokenVerifier } from "../policy-types-BnBZvh7N.js";
|
|
2
|
+
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-DPuDmlbL.js";
|
|
3
3
|
import { A as ResourceInit, C as InferPermissionTree, r as Role, w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
4
4
|
import { l as OperationLookup, n as OperationCoverageOptions } from "../coverage-AOeWiQ7Z.js";
|
|
5
|
-
import { dt as LegacyCheck } from "../index-
|
|
6
|
-
import { C as Limits, D as InstanceCache, a as PermDock, g as PrincipalIdentity, u as SnapshotOptions, v as PrincipalSource, z as ApprovalPolicySource } from "../permdock-
|
|
7
|
-
import { i as Seeds } from "../seeds-
|
|
5
|
+
import { dt as LegacyCheck } from "../index-BDJ2OZvV.js";
|
|
6
|
+
import { C as Limits, D as InstanceCache, a as PermDock, g as PrincipalIdentity, u as SnapshotOptions, v as PrincipalSource, z as ApprovalPolicySource } from "../permdock-V86uejcm.js";
|
|
7
|
+
import { i as Seeds } from "../seeds-DLjPbhvM.js";
|
|
8
8
|
import { t as SqlQuery } from "../sql-BYYNi1lu.js";
|
|
9
|
-
import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-
|
|
9
|
+
import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-5cvjmHTG.js";
|
|
10
10
|
import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
|
|
11
11
|
import { a as SaasProject } from "../permissions-UyQD5nRN.js";
|
|
12
|
-
import { n as saasPolicy } from "../policy-
|
|
13
|
-
import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-
|
|
14
|
-
import { t as CloudApproverOptions } from "../types-
|
|
15
|
-
import { c as AccessReviewStore } from "../types-
|
|
12
|
+
import { n as saasPolicy } from "../policy-DZORR-Fw.js";
|
|
13
|
+
import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-CdB9FCZh.js";
|
|
14
|
+
import { t as CloudApproverOptions } from "../types-BmTW35E5.js";
|
|
15
|
+
import { c as AccessReviewStore } from "../types-CgaGxF5q.js";
|
|
16
16
|
import { t as supabaseMembershipsBudget } from "../budget-5LJ8kfZk.js";
|
|
17
|
-
import { R as IdempotencyStore } from "../index-
|
|
18
|
-
import { g as SetQueue, l as ReplayStore } from "../types-
|
|
19
|
-
import { S as SsfStreamStore } from "../index-
|
|
20
|
-
import { s as PolicySource } from "../hosted-
|
|
21
|
-
import { l as VersionStore, n as SubjectCache, s as VersionCache } from "../subject-cache-
|
|
22
|
-
import { r as SnapshotStorage } from "../types-
|
|
23
|
-
import { a as AutomationSource, t as Automation } from "../automation-
|
|
24
|
-
import { s as SupportSessionSource } from "../index-
|
|
25
|
-
import { n as ApprovalWaiter } from "../waiter-
|
|
26
|
-
import { c as DeliveryTransport, g as TransportMessages } from "../types-
|
|
27
|
-
import { x as DirectoryStore } from "../index-
|
|
28
|
-
import { r as SupabaseHookManifest } from "../manifest-
|
|
29
|
-
import { a as ProblemDetails } from "../errors-
|
|
17
|
+
import { R as IdempotencyStore } from "../index-giCl-aQY.js";
|
|
18
|
+
import { g as SetQueue, l as ReplayStore } from "../types-B_I8TBA9.js";
|
|
19
|
+
import { S as SsfStreamStore } from "../index-CWwWkz10.js";
|
|
20
|
+
import { s as PolicySource } from "../hosted-BISipW6F.js";
|
|
21
|
+
import { l as VersionStore, n as SubjectCache, s as VersionCache } from "../subject-cache-UKUgQCEX.js";
|
|
22
|
+
import { r as SnapshotStorage } from "../types-gp1w86cV.js";
|
|
23
|
+
import { a as AutomationSource, t as Automation } from "../automation-BqUmdFfe.js";
|
|
24
|
+
import { s as SupportSessionSource } from "../index-BO5f180f.js";
|
|
25
|
+
import { n as ApprovalWaiter } from "../waiter-Bov7Cig6.js";
|
|
26
|
+
import { c as DeliveryTransport, g as TransportMessages } from "../types-CDkJNA3a.js";
|
|
27
|
+
import { x as DirectoryStore } from "../index-Co_e22iJ.js";
|
|
28
|
+
import { r as SupabaseHookManifest } from "../manifest-BwhZ1s5b.js";
|
|
29
|
+
import { a as ProblemDetails } from "../errors-BGosrHl8.js";
|
|
30
30
|
import { expectTypeOf } from "vitest";
|
|
31
31
|
/** `policyMatrix` under Vitest: one test per cell, plus the exhaustive check. */
|
|
32
32
|
export declare function describePolicy<TSubject>(policy: Policy, config: DescribePolicyConfig<TSubject>): void;
|
package/dist/testing/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as policyMatrixLayout, n as testRlsParity, r as policyMatrix, t as testOrmParity } from "../core-
|
|
2
|
-
import {
|
|
3
|
-
import { t as fromSnapshot } from "../from-snapshot-
|
|
4
|
-
import { n as parseSnapshot } from "../snapshot-
|
|
1
|
+
import { i as policyMatrixLayout, n as testRlsParity, r as policyMatrix, t as testOrmParity } from "../core-DIUrkFNL.js";
|
|
2
|
+
import { p as clientBundle, t as getPermDock } from "../permdock-JM9TKevZ.js";
|
|
3
|
+
import { t as fromSnapshot } from "../from-snapshot-DZ4D2sLa.js";
|
|
4
|
+
import { n as parseSnapshot } from "../snapshot-Dzi4LR6n.js";
|
|
5
5
|
import { t as operationCoverage } from "../coverage-C3jVYC9Y.js";
|
|
6
|
-
import {
|
|
7
|
-
import { C as saasOrg, E as saasSeed, S as saasMemberships, a as saasProject, g as verifySaasSession, h as signSaasToken, k as saasPolicy, t as saasDoc, w as saasPrincipal, x as saasCustomRoles } from "../saas-
|
|
8
|
-
import { i as saasPermissions } from "../permissions-
|
|
6
|
+
import { A as memoryCustomRoleSource, D as approvalPoliciesFor, d as snapshotFor } from "../src-BXDohWNO.js";
|
|
7
|
+
import { C as saasOrg, E as saasSeed, S as saasMemberships, a as saasProject, g as verifySaasSession, h as signSaasToken, k as saasPolicy, t as saasDoc, w as saasPrincipal, x as saasCustomRoles } from "../saas-DSeazNrN.js";
|
|
8
|
+
import { i as saasPermissions } from "../permissions-xPyAmuXi.js";
|
|
9
9
|
import { c as quoteSqlTable, o as quoteSqlIdent } from "../sql-T4GaBh9X.js";
|
|
10
10
|
import { o as resolveApproval } from "../helpers-COh0lLc1.js";
|
|
11
11
|
import { c as problemFromDecision } from "../problem-BZB7zPC7.js";
|
|
@@ -17,23 +17,23 @@ import { t as APPROVAL_HEADER } from "../types-DFZKovb3.js";
|
|
|
17
17
|
import { t as byCodePoint } from "../compare-dfHDj8kT.js";
|
|
18
18
|
import { n as role, r as allow } from "../role-builder-BksM3Q9O.js";
|
|
19
19
|
import { t as definePermissions } from "../permissions-DJ_QV9L7.js";
|
|
20
|
-
import { r as definePolicy } from "../policy-
|
|
20
|
+
import { r as definePolicy } from "../policy-CZBJDcTx.js";
|
|
21
21
|
import { i as principal } from "../refs-Cix9Zjis.js";
|
|
22
22
|
import { v as resource } from "../permission-registry-DstT40VS.js";
|
|
23
|
-
import { i as cloudEndpoints, n as cloud, s as approverHeaders, t as bearerChallenge } from "../challenge-
|
|
23
|
+
import { i as cloudEndpoints, n as cloud, s as approverHeaders, t as bearerChallenge } from "../challenge-E9sicsCA.js";
|
|
24
24
|
import { r as isRecord } from "../compact-C4LFuqbW.js";
|
|
25
25
|
import { d as isoNow, f as nowMillis, p as nowSeconds, u as isoAt } from "../time-r0CKBm57.js";
|
|
26
|
-
import { c as mergeHostedGrants, l as parsePolicyDocument } from "../hosted-
|
|
26
|
+
import { c as mergeHostedGrants, l as parsePolicyDocument } from "../hosted-D3USbpS6.js";
|
|
27
27
|
import { t as catalogFingerprint } from "../catalog-fingerprint-DAWZARy6.js";
|
|
28
28
|
import { n as discoverAuthorizationServer } from "../device-f3JEnqa0.js";
|
|
29
29
|
import { t as POLICY_NOT_PUBLISHED } from "../problem-types-81BEw0IN.js";
|
|
30
30
|
import { t as require__2020 } from "../2020-DBXhfpuK.js";
|
|
31
31
|
import { t as APPROVAL_REQUEST_SCHEMA } from "../request-schema-DzEoR310.js";
|
|
32
|
-
import { t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-
|
|
32
|
+
import { t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-dm_hFstN.js";
|
|
33
33
|
import { n as supabaseMembershipsBudget } from "../budget-BH81q2cj.js";
|
|
34
34
|
import { t as catalogSchema } from "../schema-D2OK4RrB.js";
|
|
35
35
|
import { t as CONNECTOR_SCHEMA } from "../connector-schema-BSRMyq4M.js";
|
|
36
|
-
import { t as supabaseManifestSchema } from "../manifest-schema-
|
|
36
|
+
import { t as supabaseManifestSchema } from "../manifest-schema-N3v2RVL-.js";
|
|
37
37
|
import { n as freezeDeep } from "../freeze-DGfJq_j2.js";
|
|
38
38
|
import { c as evaluateCondition } from "../delegation-0DVVomzu.js";
|
|
39
39
|
import { s as parseCredential } from "../credential-D9in5keC.js";
|
|
@@ -42,7 +42,7 @@ import { n as loadPrincipalByIdentity, t as loadPrincipal } from "../principal-s
|
|
|
42
42
|
import { r as parseAutomation } from "../automation-D58PEI7Y.js";
|
|
43
43
|
import { a as authenticated } from "../grantee-BSCdpIF3.js";
|
|
44
44
|
import { d as scopeList, o as normalizeMemberships } from "../scopes-B-KX9EI8.js";
|
|
45
|
-
import { O as validateCustomRole } from "../evaluate-
|
|
45
|
+
import { O as validateCustomRole } from "../evaluate-DNz6wMYv.js";
|
|
46
46
|
import { l as sha256Hex, n as scimHandler, t as directoryMembershipSource } from "../scim-B9QyJ23q.js";
|
|
47
47
|
import { afterAll, assert, beforeAll, describe, expect, expectTypeOf, it, vi } from "vitest";
|
|
48
48
|
// src/testing/describe-policy.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as SaasProject, c as saasPlans, i as SaasFolderSchema, l as saasRoles, n as SaasDocSchema, o as SaasProjectSchema, r as SaasFolder, s as saasPermissions, t as SaasDoc, u as saasTenantRoleNames } from "../../permissions-UyQD5nRN.js";
|
|
2
|
-
import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-
|
|
3
|
-
import {
|
|
4
|
-
import { o as PermDockOptions } from "../../permdock-
|
|
2
|
+
import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-DZORR-Fw.js";
|
|
3
|
+
import { Ar as Subject, Dr as Membership, Or as Principal, Sr as CustomRole, ct as RelationSource, nt as LimitStore, qt as Instant, vr as Actor, wr as Delegation } from "../../policy-types-BnBZvh7N.js";
|
|
4
|
+
import { o as PermDockOptions } from "../../permdock-V86uejcm.js";
|
|
5
5
|
import { w as Permission } from "../../vocabulary-DHfKPIC5.js";
|
|
6
6
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
7
7
|
type FieldKind = "string" | "boolean" | "nullable-string";
|