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,182 @@
|
|
|
1
|
+
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.js";
|
|
2
|
+
import { c as rootScope, l as scopeChain } from "./scopes-B-KX9EI8.js";
|
|
3
|
+
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
4
|
+
import { l as roleColumn } from "./sources-C6Id63F8.js";
|
|
5
|
+
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
6
|
+
import { a as quoteIdent, o as quoteLiteral, t as CLI } from "./quote-LNaBdCGA.js";
|
|
7
|
+
import { f as subjectIdSql } from "./subject-B7p94Y0s.js";
|
|
8
|
+
// src/cli/sql/names.ts
|
|
9
|
+
/** The closure table graph grants read. Part of the SQL contract. */
|
|
10
|
+
const CLOSURE = { table: "permdock_closure" };
|
|
11
|
+
/**
|
|
12
|
+
* The snake_case SQL name of a resource or link (`chatThread` becomes
|
|
13
|
+
* `chat_thread`), or `undefined` when it is not made of ASCII letters, digits
|
|
14
|
+
* and underscores starting with a letter.
|
|
15
|
+
*/
|
|
16
|
+
function graphSqlName(name) {
|
|
17
|
+
if (!/^[A-Za-z][A-Za-z0-9_]*$/u.test(name)) return;
|
|
18
|
+
return name.replaceAll(/([a-z0-9])([A-Z])/gu, "$1_$2").replaceAll(/([A-Z]+)([A-Z][a-z])/gu, "$1_$2").toLowerCase();
|
|
19
|
+
}
|
|
20
|
+
function sqlNameOf(name, label) {
|
|
21
|
+
const sql = graphSqlName(name);
|
|
22
|
+
if (sql === void 0) throw configError(`PermDock CLI: ${label} is not a SQL name (letters, digits and underscores, starting with a letter), so rls generate cannot name its helper`);
|
|
23
|
+
return sql;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The helper returning the ids of `resource` the subject holds a relation on:
|
|
27
|
+
* `permitted_<snake_case resource>_ids`.
|
|
28
|
+
*/
|
|
29
|
+
function graphHelper(resource) {
|
|
30
|
+
return permittedIdsHelper(sqlNameOf(resource, `resource '${resource}'`));
|
|
31
|
+
}
|
|
32
|
+
function inheritedRowsHelper(resource) {
|
|
33
|
+
return `permitted_${sqlNameOf(resource, `resource '${resource}'`)}_rows`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The helper returning the ids of `resource` whose `link` points into the ids
|
|
37
|
+
* it is given.
|
|
38
|
+
*/
|
|
39
|
+
function linkHelper(resource, link) {
|
|
40
|
+
return `permdock_link_${sqlNameOf(resource, `resource '${resource}'`)}_${sqlNameOf(link, `link '${link}' on ${resource}`)}`;
|
|
41
|
+
}
|
|
42
|
+
function restrictedHelper(resource) {
|
|
43
|
+
return `permdock_restricted_${sqlNameOf(resource, `resource '${resource}'`)}`;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Graph SQL parts as RLS text: values inline as literals, the subject from the
|
|
47
|
+
* dialect's claim.
|
|
48
|
+
*/
|
|
49
|
+
function graphSqlText(parts, ctx) {
|
|
50
|
+
return parts.map((part) => {
|
|
51
|
+
if ("text" in part) return part.text;
|
|
52
|
+
if ("column" in part) return quoteIdent(part.column);
|
|
53
|
+
if ("subject" in part) return subjectIdSql(ctx);
|
|
54
|
+
return typeof part.value === "string" ? quoteLiteral(part.value) : String(part.value);
|
|
55
|
+
}).join("");
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The role column of an `rls.memberships` table aliased `alias`; a `through`
|
|
59
|
+
* column joins its roles table as `<alias>k`, after a newline and `indent`
|
|
60
|
+
* (inline without one).
|
|
61
|
+
*/
|
|
62
|
+
function memberRoleOf(table, alias = "m", indent) {
|
|
63
|
+
return roleColumn(table.role, qualifySqlTable(table.table), alias, {
|
|
64
|
+
label: `rls.memberships ${table.table} role`,
|
|
65
|
+
prefix: CLI,
|
|
66
|
+
...indent === void 0 ? {} : { indent }
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/** The schema-qualified name of a table under `search_path = ''`. */
|
|
70
|
+
/** The helper returning the ids of scope `name` a grant key reaches. */
|
|
71
|
+
function permittedIdsHelper(name) {
|
|
72
|
+
if (!/^[a-z][a-z0-9_]*$/u.test(name)) throw configError(`PermDock CLI: unsafe scope name '${name}'`);
|
|
73
|
+
return `permitted_${name}_ids`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* `permitted_<scope>_ids_for(p_user, p_grant)`: the same ids for a user the
|
|
77
|
+
* caller names.
|
|
78
|
+
*/
|
|
79
|
+
function permittedForHelper(name) {
|
|
80
|
+
return `${permittedIdsHelper(name)}_for`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The helper returning the ids of scope `name` the subject holds any live
|
|
84
|
+
* membership of.
|
|
85
|
+
*/
|
|
86
|
+
function memberIdsHelper(name) {
|
|
87
|
+
if (!/^[a-z][a-z0-9_]*$/u.test(name)) throw configError(`PermDock CLI: unsafe scope name '${name}'`);
|
|
88
|
+
return `member_${name}_ids`;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* `member_<scope>_ids_for(p_user uuid)`: the same rows for a user the caller
|
|
92
|
+
* names; the token hook's helper.
|
|
93
|
+
*/
|
|
94
|
+
function memberForHelper(name) {
|
|
95
|
+
return `${memberIdsHelper(name)}_for`;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* `member_<scope>_ids_of(p_user uuid)`: `member_<scope>_ids_for(p_user)` when
|
|
99
|
+
* `p_user` is the caller and no rows otherwise, so `authenticated` may execute
|
|
100
|
+
* it; better-supabase's `teamIdsOf` template calls it.
|
|
101
|
+
*/
|
|
102
|
+
function memberOfHelper(name) {
|
|
103
|
+
return `${memberIdsHelper(name)}_of`;
|
|
104
|
+
}
|
|
105
|
+
/** better-supabase's `bootstrapPermissions` reader. Part of the SQL contract. */
|
|
106
|
+
const BOOTSTRAP_PERMISSIONS = "permdock_bootstrap_permissions";
|
|
107
|
+
/** A scope better-supabase reads as its teams: `team` or `teams` (doctor BS417). */
|
|
108
|
+
function isTeamScope(name) {
|
|
109
|
+
return /^teams?$/u.test(name);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Whether `member_<scope>_ids_of` is generated: a team scope with
|
|
113
|
+
* `member_<scope>_ids_for`.
|
|
114
|
+
*/
|
|
115
|
+
function hasMemberOf(input, name) {
|
|
116
|
+
return isTeamScope(name) && hasMemberFor(input, name);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Whether `member_<scope>_ids_for` is generated for `name`: Supabase only (its
|
|
120
|
+
* one caller is `supabase_auth_admin`), and only where `memberships` maps a
|
|
121
|
+
* table for the scope or a membership source can hold it.
|
|
122
|
+
*/
|
|
123
|
+
function hasMemberFor(input, name) {
|
|
124
|
+
if (input.dialect !== "supabase") return false;
|
|
125
|
+
return memberForTable(input, name) !== void 0 || memberForSources(input, name).length > 0;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Whether `permitted_<scope>_users` can list the members of one instance of
|
|
129
|
+
* `name`: a mapped membership table, or sources that all read a table.
|
|
130
|
+
*/
|
|
131
|
+
function hasPermittedUsers(input, name) {
|
|
132
|
+
if (memberForTable(input, name) !== void 0) return true;
|
|
133
|
+
const sources = memberForSources(input, name);
|
|
134
|
+
return sources.length > 0 && sources.every((source) => source.sql.holders !== void 0);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The table `member_<scope>_ids_for` reads for scope `name`, when `memberships`
|
|
138
|
+
* maps one with its id column.
|
|
139
|
+
*/
|
|
140
|
+
function memberForTable(input, name) {
|
|
141
|
+
const table = scopeMembershipTable(input.memberships, input.scopes, name);
|
|
142
|
+
return table !== void 0 && scopeColumn(table, input.scopes, name) !== void 0 ? table : void 0;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The sources `member_<scope>_ids_for` reads: none when a table is mapped, as
|
|
146
|
+
* in `database` mode.
|
|
147
|
+
*/
|
|
148
|
+
function memberForSources(input, name) {
|
|
149
|
+
if (memberForTable(input, name) !== void 0) return [];
|
|
150
|
+
return (input.memberSources ?? []).filter((source) => source.sql.scope === void 0 || source.sql.scope === name);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The membership sources that can hold scope `name` when `memberships` maps no
|
|
154
|
+
* table for it: every `tableMembershipSource` source and the
|
|
155
|
+
* `junctionMembershipSource` sources of that scope. Empty outside `database`
|
|
156
|
+
* mode.
|
|
157
|
+
*/
|
|
158
|
+
function scopeSources(ctx, name) {
|
|
159
|
+
if (ctx.authorize !== "database" || scopeTable(ctx, name) !== void 0) return [];
|
|
160
|
+
return (ctx.sources ?? []).filter((source) => source.sql.scope === void 0 || source.sql.scope === name);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The membership table mapped for scope `name`, with the column of its id and
|
|
164
|
+
* of the first scope's id.
|
|
165
|
+
*/
|
|
166
|
+
function scopeTable(ctx, name) {
|
|
167
|
+
const table = scopeMembershipTable(ctx.memberships, ctx.scopes, name);
|
|
168
|
+
if (table === void 0) return;
|
|
169
|
+
const column = scopeColumn(table, ctx.scopes, name);
|
|
170
|
+
if (column === void 0) return;
|
|
171
|
+
const root = rootScope(ctx.scopes);
|
|
172
|
+
const tenantColumn = root !== void 0 && scopeChain(ctx.scopes, name).includes(root) ? scopeColumn(table, ctx.scopes, root) : void 0;
|
|
173
|
+
return tenantColumn === void 0 ? {
|
|
174
|
+
table,
|
|
175
|
+
column
|
|
176
|
+
} : {
|
|
177
|
+
table,
|
|
178
|
+
column,
|
|
179
|
+
tenantColumn
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
export { scopeTable as S, memberRoleOf as _, graphSqlText as a, restrictedHelper as b, hasPermittedUsers as c, linkHelper as d, memberForHelper as f, memberOfHelper as g, memberIdsHelper as h, graphSqlName as i, inheritedRowsHelper as l, memberForTable as m, CLOSURE as n, hasMemberFor as o, memberForSources as p, graphHelper as r, hasMemberOf as s, BOOTSTRAP_PERMISSIONS as t, isTeamScope as u, permittedForHelper as v, scopeSources as x, permittedIdsHelper as y };
|
package/dist/nest/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-BlMijUtb.js";
|
|
2
|
+
import { a as PermDock } from "../permdock-V86uejcm.js";
|
|
3
3
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
4
|
-
import { D as Policy,
|
|
4
|
+
import { D as Policy, Or as Principal } from "../policy-types-BnBZvh7N.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-Bwk9tt1z.js";
|
|
7
7
|
import { r as sendResponse, t as NodeRequest } from "../http-BUIYu1Kc.js";
|
|
8
8
|
import { CanActivate, DynamicModule, ExceptionFilter, ExecutionContext, Type } from "@nestjs/common";
|
|
9
9
|
/**
|
package/dist/nest/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSi
|
|
|
2
2
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
3
3
|
import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
|
|
4
4
|
import { n as PermDockValidationError } from "../validation-error-CgDOA6VS.js";
|
|
5
|
-
import { a as socketConnection, r as bindKernel } from "../bind-
|
|
5
|
+
import { a as socketConnection, r as bindKernel } from "../bind-DPptdk31.js";
|
|
6
6
|
import { c as writeReply, r as hasCredentials } from "../http-C9jDw_bZ.js";
|
|
7
7
|
import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
|
|
8
8
|
import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
|
package/dist/next/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotKey, r as SnapshotHeadersOptions, s as snapshotTag, t as CacheLifeForOptions } from "../snapshot-cache-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotKey, r as SnapshotHeadersOptions, s as snapshotTag, t as CacheLifeForOptions } from "../snapshot-cache-CVYqOThu.js";
|
|
2
|
+
import { r as warm, t as WarmReport } from "../warm-BKD3FN6k.js";
|
|
3
|
+
import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal, Q as Intent, ir as Decision, pn as SnapshotTenants, rn as Snapshot, sr as DenialReason } from "../policy-types-BnBZvh7N.js";
|
|
4
|
+
import { m as ApprovalStore } from "../types-5cvjmHTG.js";
|
|
5
|
+
import { b as ProtectedAction, y as ActionResult } from "../store-core-Bq7Qc9QM.js";
|
|
6
|
+
import { F as PermissionState, P as PermissionCheck, a as PermDock, d as UncheckedData, s as RowData } from "../permdock-V86uejcm.js";
|
|
7
|
+
import { n as DescribeMessages } from "../describe-FT1oVN_o.js";
|
|
8
|
+
import { t as InstanceOptions } from "../instance-options-hq5Cp2Ih.js";
|
|
8
9
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
9
|
-
import { n as PermDockWrap } from "../wrap-
|
|
10
|
-
import { o as OtelWrap } from "../types-
|
|
11
|
-
import { n as PermDockProviderProps } from "../types-
|
|
10
|
+
import { n as PermDockWrap } from "../wrap-CaAA3ubO.js";
|
|
11
|
+
import { o as OtelWrap } from "../types-BMKDvcXc.js";
|
|
12
|
+
import { n as PermDockProviderProps } from "../types-Dl2jRkyq.js";
|
|
12
13
|
import { n as TenantSlugResolver } from "../tenant-from-path-Dq3jkqjh.js";
|
|
13
14
|
import { ReactElement, ReactNode } from "react";
|
|
14
15
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -273,4 +274,4 @@ type NextRouteParams = Readonly<Record<string, string | readonly string[] | unde
|
|
|
273
274
|
* instance has no tenant instead of the factory's default.
|
|
274
275
|
*/
|
|
275
276
|
export declare function tenantFromPath(options: NextTenantFromPathOptions): (params: NextRouteParams | Promise<NextRouteParams>) => Promise<string>;
|
|
276
|
-
export { type ActionResult, type CacheLifeForOptions, type GetPermDockQuery, type GetSnapshotQuery, type NextPermDock, type NextPermDockOptions, type NextPermDockProviderProps, type NextRouteParams, type NextTenantFromPathOptions, type PermDockHandler, type PermissionRequirementOptions, type ProtectAction, type ProtectActionOptions, type ProtectedAction, type ProtectedActionContext, type ProtectedActionHandler, type ServerPermissionState, type SnapshotHeaders, type SnapshotHeadersOptions, type TenantSlugResolver, cacheLifeFor, snapshotHeaders, snapshotKey, snapshotTag };
|
|
277
|
+
export { type ActionResult, type CacheLifeForOptions, type GetPermDockQuery, type GetSnapshotQuery, type NextPermDock, type NextPermDockOptions, type NextPermDockProviderProps, type NextRouteParams, type NextTenantFromPathOptions, type PermDockHandler, type PermissionRequirementOptions, type ProtectAction, type ProtectActionOptions, type ProtectedAction, type ProtectedActionContext, type ProtectedActionHandler, type ServerPermissionState, type SnapshotHeaders, type SnapshotHeadersOptions, type TenantSlugResolver, type WarmReport, cacheLifeFor, snapshotHeaders, snapshotKey, snapshotTag, warm };
|
package/dist/next/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { i as snapshotTag, n as snapshotHeaders, r as snapshotKey, t as cacheLifeFor } from "../snapshot-cache-DTTEfmxv.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { t as warm } from "../warm-BZ0ZwSmO.js";
|
|
3
|
+
import { u as withApp } from "../permdock-JM9TKevZ.js";
|
|
4
|
+
import { n as resolveOrNull, t as buildInstance } from "../build-instance-DZEWYO-A.js";
|
|
4
5
|
import { a as permissionStates } from "../checks-DSm45qH7.js";
|
|
5
6
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
6
7
|
import { n as NO_GRANT, t as LOAD_FAILED } from "../decision-hHv4UZgy.js";
|
|
@@ -486,4 +487,4 @@ function tenantFromPath(options) {
|
|
|
486
487
|
return resolveTenantSlug(options.resolve, slug);
|
|
487
488
|
};
|
|
488
489
|
}
|
|
489
|
-
export { cacheLifeFor, createPermDock, snapshotHeaders, snapshotKey, snapshotTag, tenantFromPath };
|
|
490
|
+
export { cacheLifeFor, createPermDock, snapshotHeaders, snapshotKey, snapshotTag, tenantFromPath, warm };
|
package/dist/next/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PermDockPluginOptions } from "../types-run-
|
|
1
|
+
import { n as PermDockPluginOptions } from "../types-run-ByHuYUen.js";
|
|
2
2
|
/** Any object: Next's `NextConfig` is an interface, so no index signature. */
|
|
3
3
|
type NextConfigLike = object;
|
|
4
4
|
/** What `next.config` may export: an object, or a function of the phase. */
|
package/dist/next/plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as describeError } from "../errors-DgLOqc6j.js";
|
|
2
|
-
import { i as report, r as createCollectScheduler, t as collectOnce } from "../watch-
|
|
2
|
+
import { i as report, r as createCollectScheduler, t as collectOnce } from "../watch-D-5ztqN8.js";
|
|
3
3
|
// src/cli/plugin.ts
|
|
4
4
|
const PHASE_BUILD = "phase-production-build";
|
|
5
5
|
const PHASE_DEV = "phase-development-server";
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, r as Guard, s as ScopeGuard, 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, r as Guard, s as ScopeGuard, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-BlMijUtb.js";
|
|
2
|
+
import { a as PermDock } from "../permdock-V86uejcm.js";
|
|
3
3
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
4
|
-
import { D as Policy,
|
|
5
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
4
|
+
import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
|
|
5
|
+
import { t as ServerAdapterOptions } from "../bind-Bwk9tt1z.js";
|
|
6
6
|
import { i as toRequest, n as isServerResponse, r as sendResponse, t as NodeRequest } from "../http-BUIYu1Kc.js";
|
|
7
7
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
8
8
|
type NodePermDockOptions<TUser = unknown> = ServerAdapterOptions<NodeRequest, TUser>;
|
package/dist/node/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 { r as bindKernel } from "../bind-
|
|
2
|
+
import { r as bindKernel } from "../bind-DPptdk31.js";
|
|
3
3
|
import { n as sendResponse, r as toRequest, t as isServerResponse } from "../http-dNltTpC8.js";
|
|
4
4
|
// src/node/create.ts
|
|
5
5
|
const nodeRequest = (req) => req;
|
package/dist/openai/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-
|
|
2
|
-
import { u as ApprovalRequest } from "../types-
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-CdB9FCZh.js";
|
|
2
|
+
import { u as ApprovalRequest } from "../types-5cvjmHTG.js";
|
|
3
|
+
import { a as PermDock } from "../permdock-V86uejcm.js";
|
|
4
4
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
5
|
-
import { D as Policy,
|
|
5
|
+
import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
|
|
6
6
|
/** The app context passed to `run(agent, input, { context })`. */
|
|
7
7
|
type OpenAiContext = {
|
|
8
8
|
readonly user?: unknown;
|
package/dist/openai/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as agentRuntime } from "../create-
|
|
2
|
-
import { t as approvalTokenOf } from "../kernel-
|
|
3
|
-
import { u as withApp } from "../permdock-
|
|
1
|
+
import { t as agentRuntime } from "../create-BRY0OtFV.js";
|
|
2
|
+
import { t as approvalTokenOf } from "../kernel-DSnWVZ0O.js";
|
|
3
|
+
import { u as withApp } from "../permdock-JM9TKevZ.js";
|
|
4
4
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
5
5
|
// src/openai/create.ts
|
|
6
6
|
function appContext(runContext) {
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as Policy,
|
|
1
|
+
import { D as Policy, Fr as Condition, Or as Principal } from "../policy-types-BnBZvh7N.js";
|
|
2
2
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
3
3
|
import { a as OpenApiOperationRef, c as OperationEntry, d as OperationSkipCause, f as operationPermissions, i as OPERATION_SKIP_CAUSES, l as OperationLookup, n as OperationCoverageOptions, o as OperationDeclaration, p as operationPermissionsFromOpenApi, r as operationCoverage, s as OperationEnforcement, t as OperationCoverage, u as OperationPermissions } from "../coverage-AOeWiQ7Z.js";
|
|
4
|
-
import { a as ProblemDetails } from "../errors-
|
|
4
|
+
import { a as ProblemDetails } from "../errors-BGosrHl8.js";
|
|
5
5
|
import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
type OpenApiTarget = "3.1" | "3.2" | "3.3";
|
|
7
7
|
type OverlayVersion = "1.1" | "1.2";
|
|
@@ -88,7 +88,7 @@ const importDocument = defineLeaf({
|
|
|
88
88
|
async run(ctx, { flags }) {
|
|
89
89
|
const doc = given(flags.doc);
|
|
90
90
|
if (doc === void 0) throw missingInput("openapi import", ["--doc"], "the OpenAPI document to import");
|
|
91
|
-
return (await import("./import-
|
|
91
|
+
return (await import("./import-DppjSugv.js")).runOpenapiImport({
|
|
92
92
|
cwd: ctx.cwd,
|
|
93
93
|
doc,
|
|
94
94
|
out: fileOut("openapi import", flags.out),
|
|
@@ -3,7 +3,7 @@ import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
|
3
3
|
/** The annotated document, without writing it. */
|
|
4
4
|
async function openapiDocument(task, options, source) {
|
|
5
5
|
if (options.doc === void 0) return [];
|
|
6
|
-
const { runOpenapi } = await import("./openapi-
|
|
6
|
+
const { runOpenapi } = await import("./openapi-g58VVrsc.js");
|
|
7
7
|
const outcome = await runOpenapi({
|
|
8
8
|
cwd: source.cwd,
|
|
9
9
|
config: source.config,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
2
|
-
import { r as definePolicy } from "./policy-
|
|
2
|
+
import { r as definePolicy } from "./policy-CZBJDcTx.js";
|
|
3
3
|
import { a as getResource, n as findPermission } from "./permission-registry-DstT40VS.js";
|
|
4
4
|
import { i as createPermDock, o as openapiVersion } from "./openapi-CZu6sVsP.js";
|
|
5
5
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
@@ -7,7 +7,7 @@ import { i as fileDrift } from "./output-files-8lfALMSU.js";
|
|
|
7
7
|
import { t as shortDiff } from "./text-diff-DxKRNFlx.js";
|
|
8
8
|
import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
|
|
9
9
|
import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-m7jmit3y.js";
|
|
10
|
-
import { n as validateOverlay, t as validateOpenapi } from "./schema-
|
|
10
|
+
import { n as validateOverlay, t as validateOpenapi } from "./schema-CbzVUpWv.js";
|
|
11
11
|
import { existsSync } from "node:fs";
|
|
12
12
|
import { resolve } from "node:path";
|
|
13
13
|
// src/cli/openapi/emit/merge.ts
|
package/dist/orpc/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
import { a as PermDock } from "../permdock-V86uejcm.js";
|
|
2
2
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
3
|
-
import { D as Policy,
|
|
3
|
+
import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
|
|
4
4
|
import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
|
|
5
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
6
|
-
import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-
|
|
7
|
-
import { t as RpcProtectOptions } from "../rpc-
|
|
5
|
+
import { t as ServerAdapterOptions } from "../bind-Bwk9tt1z.js";
|
|
6
|
+
import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-BlMijUtb.js";
|
|
7
|
+
import { t as RpcProtectOptions } from "../rpc-DyCWVn6C.js";
|
|
8
8
|
import { a as OperationInput, t as Operation } from "../operations-DaEoGpMV.js";
|
|
9
9
|
import { AnySchema, MetaPlugin, Middleware, Procedure, Schema } from "@orpc/server";
|
|
10
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
package/dist/orpc/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
2
2
|
import { o as isPermission } from "../permission-registry-DstT40VS.js";
|
|
3
|
-
import { n as attached } from "../bind-
|
|
3
|
+
import { n as attached } from "../bind-DPptdk31.js";
|
|
4
4
|
import { o as problemMessage } from "../http-C9jDw_bZ.js";
|
|
5
5
|
import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
|
|
6
|
-
import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-
|
|
6
|
+
import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-BQPa7tLP.js";
|
|
7
7
|
import { i as isAsyncIterable, o as reloadAfter } from "../stream-DdF94h7T.js";
|
|
8
8
|
import { r as permissionList } from "../decide-set-CgNcE6pP.js";
|
|
9
9
|
import { ORPCError, os } from "@orpc/server";
|
package/dist/otel/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as PermDock } from "../permdock-
|
|
2
|
-
import { N as PolicyVocabulary } from "../policy-types-
|
|
3
|
-
import { a as OtelOptions, i as OtelApi, n as GEN_AI_TOOL_CALL_ID, o as OtelWrap, r as GEN_AI_TOOL_NAME, s as StructuralLogger, t as GENAI_SEMCONV_PIN } from "../types-
|
|
1
|
+
import { a as PermDock } from "../permdock-V86uejcm.js";
|
|
2
|
+
import { N as PolicyVocabulary } from "../policy-types-BnBZvh7N.js";
|
|
3
|
+
import { a as OtelOptions, i as OtelApi, n as GEN_AI_TOOL_CALL_ID, o as OtelWrap, r as GEN_AI_TOOL_NAME, s as StructuralLogger, t as GENAI_SEMCONV_PIN } from "../types-BMKDvcXc.js";
|
|
4
4
|
/**
|
|
5
5
|
* Listens on one instance. Spans carry no duration and no histogram is
|
|
6
6
|
* recorded, because a listener only sees a decision after it is made; use
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as isActionRequired, l as isRetryable, n as CliError, t as CLI_ERRORS_URL } from "./errors-DgLOqc6j.js";
|
|
2
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
2
|
+
import { t as DOCS_BASE } from "./manifest-BUeAHWDT.js";
|
|
3
3
|
import { s as cliVersion } from "./version-D-jWyJb9.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
// src/cli/core/consent.ts
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { l as scopeChain, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
2
2
|
import { r as findRole } from "./vocabulary-CE2k7s1a.js";
|
|
3
|
-
import {
|
|
4
|
-
import { C as tenantTypeOf, a as kindFilterSql, f as subjectIdSql, r as globalKindFilterSql, s as memberVia } from "./subject-
|
|
3
|
+
import { S as scopeTable, _ as memberRoleOf, m as memberForTable, x as scopeSources } from "./names-DBxKx2bz.js";
|
|
4
|
+
import { C as tenantTypeOf, a as kindFilterSql, f as subjectIdSql, r as globalKindFilterSql, s as memberVia } from "./subject-B7p94Y0s.js";
|
|
5
5
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
6
|
-
import { l as roleColumn } from "./sources-
|
|
6
|
+
import { l as roleColumn } from "./sources-C6Id63F8.js";
|
|
7
7
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
8
|
-
import { a as quoteIdent, i as qualified, n as declaredArray, o as quoteLiteral, s as quoteQualified } from "./quote-
|
|
9
|
-
import { s as signedIn, t as CUSTOM_ROLES } from "./shared-
|
|
10
|
-
import {
|
|
8
|
+
import { a as quoteIdent, i as qualified, n as declaredArray, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
|
|
9
|
+
import { s as signedIn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
|
|
10
|
+
import { A as membershipRows, D as globalRoleRows, I as hasCustomRoleChecksFor, T as sourcesKeep, V as storedTenant, d as disabledColumn, h as memberColumn, j as roleRows, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, x as sourceFilters } from "./interactive-only-Bbq9e61G.js";
|
|
11
|
+
import { _ as sourceTransferTriggerSql, b as ASSIGNMENTS, g as sourceRowsSql, h as sourceHoldersTriggerSql, m as pairsSql, p as holderSources, v as holdersTriggerSql, x as OWNERSHIP, y as transferTriggerSql } from "./tables-Bxmf2beb.js";
|
|
11
12
|
// src/cli/rls/assignments.ts
|
|
12
13
|
/**
|
|
13
14
|
* The client roles whose writes the assignment triggers check; any other role
|
|
@@ -245,7 +246,8 @@ function canAssignSql(base, own, forUser = false) {
|
|
|
245
246
|
const ctx = forUser ? {
|
|
246
247
|
...base,
|
|
247
248
|
subjectId: "p_user",
|
|
248
|
-
tenants: "all"
|
|
249
|
+
tenants: "all",
|
|
250
|
+
namedUser: true
|
|
249
251
|
} : base;
|
|
250
252
|
const fn = qualified(ctx, forUser ? OWNERSHIP.canAssignFor : OWNERSHIP.canAssign);
|
|
251
253
|
const parts = [];
|
|
@@ -255,19 +257,21 @@ function canAssignSql(base, own, forUser = false) {
|
|
|
255
257
|
return `v_user_${String(index)}`;
|
|
256
258
|
};
|
|
257
259
|
const global = own.assigns.filter((pair) => pair.scope === "global");
|
|
260
|
+
const delegated = delegatedGlobalSql(ctx);
|
|
261
|
+
const gate = delegated === void 0 ? "" : ` and ${delegated}`;
|
|
258
262
|
for (const [instance, pairs] of [["p_scope_id is not null", global.filter((pair) => pair.at !== "global")], ["p_scope_id is null", global.filter((pair) => pair.at === "global")]]) {
|
|
259
263
|
if (pairs.length === 0) continue;
|
|
260
264
|
if (ctx.authorize === "database") {
|
|
261
265
|
const ur = globalRoleRows(ctx);
|
|
262
266
|
const kind = globalKindFilterSql(ctx, ur.roleSql);
|
|
263
|
-
parts.push(`${instance} and exists (
|
|
267
|
+
parts.push(`${instance}${gate} and exists (
|
|
264
268
|
select 1 from ${ur.from}
|
|
265
269
|
where ${ur.userSql} = ${subjectIdSql(ctx)}
|
|
266
270
|
and (${ur.roleSql}, p_role) in (${pairsSql(pairs)})${kind === void 0 ? "" : `\n and ${kind}`}
|
|
267
271
|
)`);
|
|
268
272
|
} else {
|
|
269
273
|
const kind = globalKindFilterSql(ctx, "r.role");
|
|
270
|
-
parts.push(`${instance} and exists (
|
|
274
|
+
parts.push(`${instance}${gate} and exists (
|
|
271
275
|
select 1 from ${roleRows(ctx)}
|
|
272
276
|
where (r.role, p_role) in (${pairsSql(pairs)})${kind === void 0 ? "" : `\n and ${kind}`}
|
|
273
277
|
)`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { tn as LocalSnapshotManifest } from "./policy-types-BnBZvh7N.js";
|
|
2
2
|
/**
|
|
3
3
|
* Whether `value` has the shape `localSnapshotManifest(policy)` writes, with no
|
|
4
4
|
* prototype keys. A JSON import widens `v: 1` to `number`; this narrows it back
|
package/dist/pdp/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as PermDockOptions } from "../permdock-
|
|
2
|
-
import { D as Policy,
|
|
3
|
-
import { a as RelationMap, c as RemotePdpEndpoints, d as SpiceDbCheck, f as SpiceDbOptions, i as PdpPermDock, l as RemotePdpMapping, n as OpenFgaTuple, o as RemotePdpAuth, r as PdpFactory, s as RemotePdpCache, t as OpenFgaOptions, u as RemotePdpOptions } from "../types-
|
|
1
|
+
import { o as PermDockOptions } from "../permdock-V86uejcm.js";
|
|
2
|
+
import { D as Policy, N as PolicyVocabulary, Or as Principal, Y as DecisionProvider } from "../policy-types-BnBZvh7N.js";
|
|
3
|
+
import { a as RelationMap, c as RemotePdpEndpoints, d as SpiceDbCheck, f as SpiceDbOptions, i as PdpPermDock, l as RemotePdpMapping, n as OpenFgaTuple, o as RemotePdpAuth, r as PdpFactory, s as RemotePdpCache, t as OpenFgaOptions, u as RemotePdpOptions } from "../types-CrUguLsE.js";
|
|
4
4
|
/**
|
|
5
5
|
* The PDP-aware instance, built synchronously like core `getPermDockSync`; use
|
|
6
6
|
* `getPermDock` for asynchronous inputs.
|
package/dist/pdp/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { n as PermDockValidationError } from "../validation-error-CgDOA6VS.js";
|
|
|
4
4
|
import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
|
|
5
5
|
import { n as freezeDeep } from "../freeze-DGfJq_j2.js";
|
|
6
6
|
import { n as internalsOf, t as attachInternals } from "../internals-D58TnmDB.js";
|
|
7
|
-
import { n as getPermDockSync$1, t as getPermDock$1 } from "../permdock-
|
|
7
|
+
import { n as getPermDockSync$1, t as getPermDock$1 } from "../permdock-JM9TKevZ.js";
|
|
8
8
|
import { a as getResource, c as listPermissions } from "../permission-registry-DstT40VS.js";
|
|
9
9
|
import { a as postJson, c as ttlMs, i as joinUrl, n as denied, o as resourceIdOf, r as granted, s as ttlCache, t as cacheKey } from "../shared-BOsJIQf4.js";
|
|
10
10
|
import { n as toWireDelegation } from "../wire-delegation-DC5Cyec4.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as isReadonlyArray, r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
|
|
2
|
-
import { A as emptyListeners, I as contactMemberships, L as isContact, a as assignableNamesFor, c as roleSourceFor, j as finish, k as emitSafe, l as sourceName, o as customRolesFor, t as evaluate, y as indexCustomRoles } from "./evaluate-
|
|
2
|
+
import { A as emptyListeners, I as contactMemberships, L as isContact, a as assignableNamesFor, c as roleSourceFor, j as finish, k as emitSafe, l as sourceName, o as customRolesFor, t as evaluate, y as indexCustomRoles } from "./evaluate-DNz6wMYv.js";
|
|
3
3
|
import { n as PermDockValidationError } from "./validation-error-CgDOA6VS.js";
|
|
4
4
|
import { n as isThenable } from "./thenable-BxMy2v8w.js";
|
|
5
|
-
import { c as heldRoleNames, d as audiencesOf, g as asMembershipSource, i as assignableIn, l as roleLeaf, m as roleMeta, n as snapshotScopes, o as collectSnapshotGrants, s as whereGrant, t as snapshotOf, u as applyRoleKinds } from "./instance-snapshot-
|
|
5
|
+
import { c as heldRoleNames, d as audiencesOf, g as asMembershipSource, i as assignableIn, l as roleLeaf, m as roleMeta, n as snapshotScopes, o as collectSnapshotGrants, s as whereGrant, t as snapshotOf, u as applyRoleKinds } from "./instance-snapshot-D03srwnf.js";
|
|
6
6
|
import { i as readAppData } from "./app-data-DbSPSPIl.js";
|
|
7
7
|
import { n as pickVisible, r as sanitizeContext } from "./fields-C0L2FoZk.js";
|
|
8
8
|
import { n as freezeDeep, t as freezeCopy } from "./freeze-DGfJq_j2.js";
|
|
9
9
|
import { t as byCodePoint } from "./compare-dfHDj8kT.js";
|
|
10
10
|
import { _ as keyToScope, a as getResource, c as listPermissions, g as formerScopes, n as findPermission } from "./permission-registry-DstT40VS.js";
|
|
11
|
-
import { f as policyX, n as declaredRoleNames } from "./policy-
|
|
11
|
+
import { f as policyX, n as declaredRoleNames } from "./policy-CZBJDcTx.js";
|
|
12
12
|
import { d as scopeList, o as normalizeMemberships, p as tenantOf, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
13
13
|
import { r as isSubject, t as anonymousSubject } from "./subject-DkxY-AhF.js";
|
|
14
14
|
import { c as nowSeconds, d as resolveActiveTenant, m as tenantsOf, p as scopeField, t as heldRoleNamesIn, u as relatesTo } from "./tenancy-B5Xxt9Sc.js";
|
|
@@ -16,15 +16,15 @@ import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t a
|
|
|
16
16
|
import { i as decideAllWith, n as canAllWith } from "./checks-DSm45qH7.js";
|
|
17
17
|
import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
|
|
18
18
|
import { r as sha256Digest } from "./sha256-DFsnyVPo.js";
|
|
19
|
-
import { a as internGrants, n as compactSnapshot } from "./snapshot-compact-
|
|
19
|
+
import { a as internGrants, n as compactSnapshot } from "./snapshot-compact-BWMLnIXK.js";
|
|
20
20
|
import { i as withoutRequirement } from "./snapshot-requires-DfUqCLEb.js";
|
|
21
|
-
import { a as snapshotVocabulary, i as snapshotGrant, s as subjectFromSnapshot } from "./snapshot-
|
|
21
|
+
import { a as snapshotVocabulary, i as snapshotGrant, s as subjectFromSnapshot } from "./snapshot-Dzi4LR6n.js";
|
|
22
22
|
import { r as findRole } from "./vocabulary-CE2k7s1a.js";
|
|
23
|
-
import { a as permittedScopeIds, c as deniedFor, i as permittedIds, n as filterIds, o as withExpandedView, r as mayUseOf, s as decideForTarget } from "./may-use-
|
|
23
|
+
import { a as permittedScopeIds, c as deniedFor, i as permittedIds, n as filterIds, o as withExpandedView, r as mayUseOf, s as decideForTarget } from "./may-use-ikNCnNgZ.js";
|
|
24
24
|
import { o as flattenGrantee } from "./grantee-BSCdpIF3.js";
|
|
25
|
-
import { i as whereFromGrants, r as subjectInTenant, t as evaluateSnapshot } from "./snapshot-evaluate-
|
|
25
|
+
import { i as whereFromGrants, r as subjectInTenant, t as evaluateSnapshot } from "./snapshot-evaluate-C382Z1mQ.js";
|
|
26
26
|
import { t as attachInternals } from "./internals-D58TnmDB.js";
|
|
27
|
-
import { n as signSnapshot, t as filterMemberships } from "./membership-filter-
|
|
27
|
+
import { n as signSnapshot, t as filterMemberships } from "./membership-filter-Bz9QX6E9.js";
|
|
28
28
|
import { r as relationReader, t as pendingRelations } from "./relations-CIgB5KPJ.js";
|
|
29
29
|
// src/core/granted-permissions.ts
|
|
30
30
|
/**
|
|
@@ -111,12 +111,12 @@ function probeMembership(policy, role, scope) {
|
|
|
111
111
|
roles: [role]
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function probeSnapshot(policy, principal) {
|
|
114
|
+
function probeSnapshot(policy, principal, customRoles = []) {
|
|
115
115
|
return snapshotOf(policy, {
|
|
116
116
|
principal,
|
|
117
117
|
context: {}
|
|
118
118
|
}, {
|
|
119
|
-
customRoles
|
|
119
|
+
customRoles,
|
|
120
120
|
omitAssignable: true,
|
|
121
121
|
omitTypeLevel: true,
|
|
122
122
|
tenants: "all"
|
|
@@ -227,7 +227,7 @@ function sameList(a, b) {
|
|
|
227
227
|
* from the bundle in any term (a bound claim, a plan gate, a delegation, an
|
|
228
228
|
* `include`) stays inline, so the client never rebuilds a rule.
|
|
229
229
|
*/
|
|
230
|
-
function compactWithBundle(policy, expanded) {
|
|
230
|
+
function compactWithBundle(policy, expanded, custom) {
|
|
231
231
|
const { bundle, expected: expectedByRole, shared } = memoOf(policy);
|
|
232
232
|
const memberships = expanded.subject.principal?.memberships ?? [];
|
|
233
233
|
const memberAt = /* @__PURE__ */ new Map();
|
|
@@ -278,7 +278,7 @@ function compactWithBundle(policy, expanded) {
|
|
|
278
278
|
}
|
|
279
279
|
const sharedDigest = shared !== void 0 && bundle.shared !== void 0 && sameList(sharedCanon, shared) ? bundle.shared.digest : void 0;
|
|
280
280
|
if (sharedDigest !== void 0) for (const at of sharedAt) removed.add(at);
|
|
281
|
-
if (held.length === 0 && sharedDigest === void 0) return compactSnapshot(expanded, void 0, bundle);
|
|
281
|
+
if (held.length === 0 && sharedDigest === void 0) return compactSnapshot(expanded, void 0, bundle, custom);
|
|
282
282
|
const wire = {
|
|
283
283
|
held,
|
|
284
284
|
digests,
|
|
@@ -287,7 +287,7 @@ function compactWithBundle(policy, expanded) {
|
|
|
287
287
|
return compactSnapshot({
|
|
288
288
|
...expanded,
|
|
289
289
|
grants: expanded.grants.filter((_, at) => !removed.has(at))
|
|
290
|
-
}, wire, bundle);
|
|
290
|
+
}, wire, bundle, custom);
|
|
291
291
|
}
|
|
292
292
|
// src/core/app.ts
|
|
293
293
|
const APP = Symbol.for("permdock.app");
|
|
@@ -1558,4 +1558,4 @@ function getPermDock(policy, user, options = {}) {
|
|
|
1558
1558
|
const { instances, ...rest } = options;
|
|
1559
1559
|
return Promise.resolve().then(() => instances === void 0 ? create(policy, user, rest) : cachedInstance(policy, user, rest, instances, (cached) => create(policy, user, cached)));
|
|
1560
1560
|
}
|
|
1561
|
-
export { delegatedScopeMap as a, APP as c,
|
|
1561
|
+
export { sameList as _, delegatedScopeMap as a, APP as c, PROBE as d, canonOf as f, probeSnapshot as g, probeGroup as h, challengeScope as i, appOf as l, compactWithBundle as m, getPermDockSync as n, hasScope as o, clientBundle as p, resolveSubject as r, scopesReaching as s, getPermDock as t, withApp as u, isGlobalPermission as v };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as Policy,
|
|
1
|
+
import { Ar as Subject, D as Policy, Dr as Membership, Fr as Condition, J as CustomRoleSourceFactory, N as PolicyVocabulary, Nr as AdapterId, Or as Principal, Q as Intent, X as DecisionSink, Z as EntitlementSource, _ as Grant, _t as TokenSigner, ct as RelationSource, dr as LimitDetail, gn as AuthEvent, ir as Decision, it as MembershipSource, jn as Scope, lr as ExplainedDecision, lt as SettingsSource, mr as Quota, nt as LimitStore, o as ApprovalOption, pn as SnapshotTenants, pr as Obligation, q as CustomRoleSource, qt as Instant, rn as Snapshot, vr as Actor, wr as Delegation, y as GrantLimit, yn as DecisionEvent } from "./policy-types-BnBZvh7N.js";
|
|
2
2
|
import { K as AppData, P as ResourceNode, V as RowOf, a as RoleTree, n as PlanTree, r as Role, w as Permission } from "./vocabulary-DHfKPIC5.js";
|
|
3
3
|
import { i as OperationEffect, s as OperationMeta, t as Operation, u as OperationRisk } from "./operations-DaEoGpMV.js";
|
|
4
|
-
import { a as HostedPolicies } from "./hosted-
|
|
4
|
+
import { a as HostedPolicies } from "./hosted-BISipW6F.js";
|
|
5
5
|
/**
|
|
6
6
|
* One approval requirement kept as data, for a tenant or the whole platform. It
|
|
7
7
|
* adds to what the code requires and never removes a requirement.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as crud } from "./src-
|
|
1
|
+
import { c as crud } from "./src-BXDohWNO.js";
|
|
2
2
|
import { t as definePermissions } from "./permissions-DJ_QV9L7.js";
|
|
3
3
|
import { n as defineRoles, t as definePlans } from "./vocabulary-CE2k7s1a.js";
|
|
4
4
|
import { v as resource } from "./permission-registry-DstT40VS.js";
|