permdock 0.16.0 → 0.18.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 +3 -3
- package/dist/{adapter-context-CIQpQxbE.js → adapter-context-OHikyRqV.js} +1 -1
- package/dist/{adoption-scan-C2BCiUEG.js → adoption-scan-CxExBYSJ.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/approval-normalize-CUjgSsOl.js +189 -0
- package/dist/approval-policies-oNnckT12.d.ts +138 -0
- package/dist/{approval-prompt-3BqWczTt.d.ts → approval-prompt-Bg7gDSqd.d.ts} +1 -1
- package/dist/approvals/index.d.ts +5 -4
- package/dist/approvals/index.js +7 -6
- package/dist/{approvals-DnIBTuXE.js → approvals-DGId_hgJ.js} +3 -3
- package/dist/{approvers-B4r0N_Uz.js → approvers-BaNwKYgd.js} +20 -1
- package/dist/{arazzo-ClYz2Z0W.js → arazzo--riLuGY0.js} +4 -4
- package/dist/{arazzo-CHoYnQXO.js → arazzo-CEDbb-uM.js} +2 -2
- package/dist/{args-0FrVs5EH.js → args-iafbHiXn.js} +2 -5
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +2 -2
- package/dist/{audience-DTjR8xet.js → audience-B4YR9UpV.js} +1 -1
- package/dist/{auth--yPyZNgr.js → auth-j3Eu-j4h.js} +1 -1
- package/dist/authz-topic-Dbc-HDOS.js +15 -0
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +2 -2
- package/dist/{automation-C6Jg75xq.d.ts → automation-Bfa_wD1h.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-auth/index.js +10 -8
- package/dist/better-supabase/index.d.ts +335 -38
- package/dist/better-supabase/index.js +778 -117
- package/dist/{better-supabase-Dirf_8Ec.js → better-supabase-BJtQ-kNf.js} +26 -10
- package/dist/{bind-BNQA9JK9.js → bind-B4pMH9bm.js} +6 -6
- package/dist/{bind-YYjvfpB9.d.ts → bind-DR6ku3A9.d.ts} +7 -7
- package/dist/{budget-BELja5A9.js → budget-BBCPDOGP.js} +1 -1
- package/dist/{budget-hYsPz_yE.d.ts → budget-CNLsV2SL.d.ts} +1 -1
- package/dist/{build-instance-BWXqwQYU.js → build-instance-BFMFQdE_.js} +3 -2
- package/dist/{capability-Di9tiUvi.d.ts → capability-BZ_veK9o.d.ts} +1 -1
- package/dist/{capability-BqX94r07.js → capability-zN6T9fxe.js} +2 -3
- package/dist/{casbin-D_rVQ31U.js → casbin-DCQHkkyj.js} +2 -2
- package/dist/{casbin-C9EvElBb.js → casbin-bKC1FpEx.js} +2 -2
- package/dist/{casl-C4OINZHI.js → casl-CjBVJj8R.js} +2 -2
- package/dist/{casl-CHHoCldP.js → casl-CkBssiB1.js} +1 -1
- package/dist/catalog/index.d.ts +5 -5
- package/dist/catalog/index.js +7 -7
- package/dist/catalog-Caqhbdix.js +1 -0
- package/dist/{catalog-CGlSwU6j.js → catalog-D1fw8qif.js} +5 -5
- package/dist/{catalog-doc-DjMKzJp9.js → catalog-doc-C4DGfJCO.js} +3 -3
- package/dist/{catalog-operations-DeHTrJSV.js → catalog-operations-BD22drQf.js} +4 -4
- package/dist/{catalog-amPDr0JQ.js → catalog-zzNuR3sY.js} +3 -3
- package/dist/{challenge-DImNcR7B.js → challenge-B2O2OLEk.js} +2 -2
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +2 -2
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/{checks-CGkP3Z7A.js → checks-fyDOhcz0.js} +33 -1
- 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/clerk/index.js +10 -7
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +5 -5
- package/dist/cli/index.js +3 -3
- package/dist/client-CH7vzSAY.d.ts +32 -0
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-DdaJ7ILM.js → cloud-C0vXBmLG.js} +4 -4
- package/dist/{codemod-B1USJS7a.js → codemod-C-L0w-u7.js} +3 -3
- package/dist/{codemod-ammy6wv4.js → codemod-eYI1FbeJ.js} +395 -8
- package/dist/{collect-DnXL4B8c.js → collect-CU85z6Ta.js} +4 -4
- package/dist/{collect-WCl8cJQV.js → collect-D878zLDP.js} +4 -4
- package/dist/collect-KCtOigxx.js +1 -0
- package/dist/compile/index.d.ts +1 -1
- package/dist/compile/index.js +1 -1
- package/dist/{compile-EzEMB-7v.js → compile-B_oJqmIg.js} +4 -4
- package/dist/{compile-BEklRUYo.d.ts → compile-DBm0ub4p.d.ts} +2 -2
- package/dist/{completion--Y4YItFZ.js → completion-Dauc6pVT.js} +3 -3
- package/dist/{config-CcLlvEYW.js → config-COHmivz9.js} +4 -4
- package/dist/{config-BQ77xMZk.js → config-DWp2PucY.js} +2 -2
- package/dist/{config-report-DVMOLJ7F.js → config-report-DKpFm5ID.js} +2 -2
- package/dist/{context-BnIzxTNE.js → context-DeammvFl.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +3 -3
- package/dist/{core-lxoANyai.js → core-B8sLve3z.js} +7 -7
- package/dist/{core-CFepFiDP.d.ts → core-D87h2kpR.d.ts} +2 -2
- package/dist/{create-BLPKnJKa.js → create-3A7J9KRR.js} +6 -5
- package/dist/{create-CDd9c22W.d.ts → create-BrQXL-Wt.d.ts} +6 -6
- package/dist/{create-BPUopdfL.d.ts → create-BzwjZuRS.d.ts} +7 -7
- package/dist/{create-Coq5fIrq.js → create-C-tm3KIF.js} +5 -5
- package/dist/{create-DBvUsgzK.d.ts → create-CtoT1lIQ.d.ts} +4 -4
- package/dist/{credential-CyyyvCsL.js → credential-B3Hj4puZ.js} +4 -3
- package/dist/{credentials-CdDxp7jN.js → credentials-dkycUsY3.js} +1 -1
- package/dist/decision-CaG5_eNJ.js +21 -0
- package/dist/{delegation-CDB6_keF.js → delegation-aK4T_5WU.js} +3 -3
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-DHldhVUv.d.ts → denied-text-DlIxt8fh.d.ts} +1 -1
- package/dist/{describe-BbFPBSms.d.ts → describe-BKtC_8PG.d.ts} +1 -1
- package/dist/{describe-Bb4hGK5d.js → describe-BZAlPHxT.js} +2 -1
- package/dist/{diff-DfmYaIhB.js → diff-BnNHqtHj.js} +8 -8
- package/dist/{diff-CxtbOi2l.js → diff-CBCzOTWM.js} +2 -2
- package/dist/{doctor-D1Xnmy6u.js → doctor-CkYKCuX7.js} +233 -30
- package/dist/{doctor-CwYc2lJb.js → doctor-xUpR5rXg.js} +3 -3
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/drizzle/index.js +1 -1
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-Vpu6rKHl.js → errors-BhRkoNS7.js} +0 -2
- package/dist/{errors-BIM4MFsJ.d.ts → errors-TpzkEKgJ.d.ts} +1 -1
- package/dist/{evaluate-BAmf_AQd.js → evaluate-Czbj7thS.js} +18 -15
- package/dist/{evaluations-DOWuBpWv.d.ts → evaluations-CisTTURl.d.ts} +3 -3
- package/dist/{evaluations-IBceAeKT.js → evaluations-h3KoJAPa.js} +3 -22
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +3 -3
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +3 -3
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +3 -3
- package/dist/{fetch-adapter-BIbBAtPZ.d.ts → fetch-adapter-BdmfnbJM.d.ts} +2 -2
- package/dist/{fetch-adapter-dPTgJVHd.js → fetch-adapter-DH-NJPbL.js} +2 -2
- package/dist/{fields-DI8s3cPl.js → fields-CrjL6A49.js} +3 -3
- package/dist/{files-B3AA05f1.js → files-CfiRtQ-m.js} +1 -1
- package/dist/{fixtures-Bm4_K1ke.js → fixtures-Cemqurt8.js} +10 -4
- package/dist/{flags-DXjoTVbS.js → flags-BlmpmXoY.js} +2 -2
- package/dist/{from-snapshot-DCakWRsr.js → from-snapshot-DMlSSo9b.js} +14 -12
- package/dist/{gen-DwgCSC6V.js → gen-BEIN-DRM.js} +2 -2
- package/dist/{gen-DuAhghDw.js → gen-mf-MRwVr.js} +9 -9
- package/dist/{generate-CRVV5V7l.js → generate-BqkZq8Dr.js} +2 -2
- package/dist/{grantee-conditions-BrYPe-w0.js → grantee-conditions-DX4K_gGI.js} +1 -1
- package/dist/{grantee-match-7RZZvoT_.js → grantee-match-BP-k4vRJ.js} +2 -2
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-DJicaG6f.js → helpers-DmqGy63f.js} +85 -13
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DVxlLZMe.d.ts → hosted-BFNXwcjd.d.ts} +1 -1
- package/dist/{hosted-D0IzESu_.js → hosted-waouw2V-.js} +12 -10
- package/dist/{http-DOL33cO0.js → http-DhMWeB_h.js} +1 -1
- package/dist/{import-CNBF96hB.js → import-C1XXpG_m.js} +4 -4
- package/dist/{import-Dfe2unKO.js → import-DObwEota.js} +3 -3
- package/dist/{index-BinlXeU-.d.ts → index-BhnOOnp9.d.ts} +2 -2
- package/dist/{index-ymept53A.d.ts → index-CVGio3cH.d.ts} +4 -4
- package/dist/{index-DJwEgYzA.d.ts → index-CdMOd-GY.d.ts} +17 -11
- package/dist/{index-Cay5-Kvx.d.ts → index-CdUTE6qd.d.ts} +11 -10
- package/dist/{index-Dj2qF9VC.d.ts → index-Dfv9Toct.d.ts} +1 -1
- package/dist/{index-CV-7DWeD.d.ts → index-rFp6X_QP.d.ts} +4 -4
- package/dist/index.d.ts +18 -16
- package/dist/index.js +24 -20
- package/dist/{init-BUo2G-FI.js → init-CNJ8lLjo.js} +5 -5
- package/dist/{init-C6cWP3xW.js → init-DS3PEsCG.js} +5 -5
- package/dist/{instance-options-CoHn-0e8.d.ts → instance-options-2sFGSdsf.d.ts} +2 -2
- package/dist/{instance-snapshot-DuWf1cT3.js → instance-snapshot-BWa71my8.js} +15 -12
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +3 -3
- package/dist/{kernel-BD8QuMnv.js → kernel-30Z2zM_d.js} +10 -10
- package/dist/kysely/index.d.ts +3 -3
- package/dist/kysely/index.js +1 -1
- package/dist/{load-DjSU5KXO.js → load-BaEamml-.js} +1 -1
- package/dist/load-CjnlPxpL.js +1 -0
- package/dist/{login-D1MHOomI.js → login-BgK5Jloo.js} +4 -4
- package/dist/{login-DCKE5pVy.js → login-DUVzBLh7.js} +4 -4
- package/dist/{manifest-BXTbHNIV.js → manifest-BdzBobNK.js} +1 -1
- package/dist/{manifest-schema-DQkBK2Mr.js → manifest-schema-CsFsYLF-.js} +1 -1
- package/dist/{manifest-Cft51TLK.js → manifest-wclLWBVH.js} +37 -37
- package/dist/{map-claims-C-nv08_n.js → map-claims-PQwHynxV.js} +25 -11
- package/dist/{map-error-pasIGqMT.js → map-error-BH16Ah8P.js} +1 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +9 -9
- package/dist/{migrate-BJHxQqT5.js → migrate-BbY5-Khy.js} +4 -4
- package/dist/{module-values-B1EVTkHP.js → module-values-B8tNIxdd.js} +2 -2
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +45 -13
- package/dist/next/index.js +68 -30
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +2 -2
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +2 -2
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-BwWkHxvW.js → openapi-C4gFqeRz.js} +4 -4
- package/dist/{openapi-DSzQN7Zu.js → openapi-zMEB9qxn.js} +5 -5
- package/dist/{operation-findings-CXtFzlKJ.js → operation-findings-CVwJHEu_.js} +1 -1
- package/dist/operation-risks-BKOcTv8J.js +13 -0
- package/dist/operations-Bm9HFecz.js +89 -0
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +3 -3
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +1 -1
- package/dist/{output-DlICTjBh.js → output-BFWLER4r.js} +1 -1
- package/dist/output-files-BYscrQl-.js +1 -0
- package/dist/{output-files-BIQ_9pIs.js → output-files-CM0BnH05.js} +1 -1
- package/dist/{ownership-qqBuGJXr.js → ownership-D-mIt-w0.js} +6 -6
- package/dist/{parse-1_ZheTW5.js → parse-UTC-sDrt.js} +2 -2
- package/dist/{parse-local-manifest-DEiCF4ah.js → parse-local-manifest-CxcSMQgl.js} +2 -2
- package/dist/{parse-local-manifest-CCmbhnxP.d.ts → parse-local-manifest-DvjTQNuO.d.ts} +1 -1
- package/dist/{parse-request-CwCZpyjV.js → parse-request-DOBVaeiQ.js} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +3 -3
- package/dist/{peer-Q0fuZ6hx.js → peer-BuK9F53f.js} +1 -1
- package/dist/{peer-C9LvBCcb.js → peer-n-swIV4H.js} +1 -1
- package/dist/{permdock-BvjivVb9.js → permdock-D-_WrdKu.js} +205 -102
- package/dist/{permdock-CprAPN3w.d.ts → permdock-ffY4CMd9.d.ts} +101 -131
- package/dist/{permissions-CYcHj_w7.js → permissions-B3ggI88M.js} +2 -2
- package/dist/{permissions-CVXmRILq.js → permissions-BaoLxy66.js} +1 -13
- package/dist/{pg-DQTqRrou.js → pg-Ddxsd5ZB.js} +2 -2
- package/dist/{policy-BycVKnXv.d.ts → policy-BtKSApSt.d.ts} +1 -1
- package/dist/{policy-CLQ8__GF.js → policy-cV_wwPb8.js} +5 -4
- package/dist/{policy-from-catalog-CU3An8uP.js → policy-from-catalog-B68hGC0S.js} +9 -8
- package/dist/{policy-types-DGIO_gxq.d.ts → policy-types-D-GwfQTc.d.ts} +72 -19
- package/dist/{postgrest-DAxFltvO.js → postgrest-BrjrckDG.js} +74 -19
- package/dist/{postgrest-D5nUGm-c.d.ts → postgrest-D84p5dbA.d.ts} +12 -7
- package/dist/{powersync-CBhTBhG2.js → powersync-9PYOE1wt.js} +158 -21
- package/dist/{powersync-DAfo0EL5.js → powersync-DStC_g0B.js} +3 -3
- package/dist/powersync-xNRlC4jN.js +1 -0
- package/dist/preset/index.js +1 -1
- package/dist/{preset-BjLzeFpp.js → preset-pPrVyGU5.js} +74 -7
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.js +1 -1
- package/dist/{protected-action-QEA8arRB.js → protected-action-B40tU3yP.js} +15 -5
- package/dist/{protected-action-D8x73IGm.d.ts → protected-action-Ds_EUY8B.d.ts} +14 -7
- package/dist/{protected-action-DUYqb-Ma.js → protected-action-OpOxtTsN.js} +1 -1
- package/dist/{provider-C55OGXJ7.js → provider-CY4TSSJo.js} +2 -2
- package/dist/{provider-DfLeek9O.d.ts → provider-OtnIiFWm.d.ts} +1 -1
- package/dist/{provider-store-CaTv00tr.js → provider-store-BQP_pp8s.js} +2 -2
- package/dist/{pull-CQCGy1gv.js → pull-DLP4I1Kl.js} +7 -7
- package/dist/pull-UBjDnf4b.js +1 -0
- package/dist/{push-Dq_ca4-j.js → push-BSb8j1EW.js} +8 -8
- package/dist/{pushed-policy-CDuOL2de.js → pushed-policy-BecMsTtM.js} +1 -1
- package/dist/{pushed-policy-CryQheKq.d.ts → pushed-policy-Ck3FZcoy.d.ts} +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/index.js +6 -6
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +104 -39
- package/dist/react-native/index.js +199 -40
- package/dist/refresh-on-L9UOwATg.d.ts +49 -0
- package/dist/{replay-Bs9Df2fQ.d.ts → replay-E5X9E1lC.d.ts} +1 -1
- package/dist/{request-context-Duzdf0cd.js → request-context-DM6_jY1n.js} +2 -2
- package/dist/{request-schema-DhX7UbfQ.js → request-schema-CMP8Cmxd.js} +5 -0
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-Y1Cb22cp.js → resolve-names-CBl4r4_r.js} +6 -6
- package/dist/{rls-tHu7N_Pe.js → rls-DGBL-jDY.js} +20 -20
- package/dist/{rls-C5ZGzR_B.js → rls-pAHGYgTb.js} +4 -4
- package/dist/{role-builder-BK2-T6oD.js → role-builder-CMW4wWzn.js} +3 -157
- package/dist/{rpc-vHIwyXCp.js → rpc-KwX_Jcxz.js} +2 -2
- package/dist/{run-DUq1xU4K.js → run-B7lv3NuK.js} +8 -40
- package/dist/run-UPbacxPg.js +1 -0
- package/dist/{run-ticket-DfnZCh-u.js → run-ticket-CjvXr6wj.js} +1 -1
- package/dist/{run-ticket-ylovhyFQ.d.ts → run-ticket-DPaD27_r.d.ts} +2 -2
- package/dist/{runtime-BGnrOkVH.js → runtime-rf0ZuyF3.js} +1 -1
- package/dist/{saas-DK4V-3Is.js → saas-B8H1MsQ3.js} +13 -10
- package/dist/{scan-C3HRH9Fs.js → scan-0r3OZqqK.js} +1 -1
- package/dist/{schema-DvXvxPhQ.js → schema-B_9tXrbG.js} +1 -1
- package/dist/{schema-BOJjqlWL.js → schema-CuX70xgH.js} +15 -2
- package/dist/scim/index.d.ts +1 -1
- package/dist/scim/index.js +1 -1
- package/dist/{scim-jJBJ7g1Z.js → scim-C30QBBoF.js} +2 -1
- package/dist/{scim-D8YupzX1.js → scim-CovliQUg.js} +2 -2
- package/dist/{scopes-0Up_UA2t.js → scopes-BSdYaGHs.js} +9 -40
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +8 -8
- package/dist/{server-3cVlTLde.js → server-D0PW6ZCw.js} +2 -2
- package/dist/{server-types-CyRN0-Cd.d.ts → server-types-3OnXjZ2D.d.ts} +8 -8
- package/dist/{shared-l0oGGetg.js → shared-BRmCJxDK.js} +2 -2
- package/dist/{shared-DrGLwM3s.js → shared-DyYVEjKC.js} +2 -2
- package/dist/{sink-B5zoUW_O.d.ts → sink-ogbVkyeo.d.ts} +2 -2
- package/dist/{skills-Celu2W6v.js → skills-B4MPRxQd.js} +2 -2
- package/dist/{skills-B2qTbaQa.js → skills-C9sTD70r.js} +2 -2
- package/dist/{snapshot-CXlzi69u.js → snapshot-DN_8J27z.js} +6 -2
- package/dist/{snapshot-cache-BjAWkchD.d.ts → snapshot-cache-B4YvlGG_.d.ts} +20 -6
- package/dist/{snapshot-cache-Bx_4xC_6.js → snapshot-cache-B66h7FBK.js} +25 -8
- package/dist/solid/index.d.ts +7 -7
- package/dist/solid/index.js +6 -6
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-oB1Hg1Fm.d.ts → sources-xdQShLDU.d.ts} +1 -1
- package/dist/{src-C_pi2Rnh.js → src-Brzq_0in.js} +193 -128
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +1 -1
- package/dist/{standard-webhooks-DOYEuOLx.d.ts → standard-webhooks-BfPaZ6T1.d.ts} +2 -2
- package/dist/{types-tQB2CEnY.d.ts → store-DYeB-_U3.d.ts} +114 -113
- package/dist/{store-RNFvaJJv.js → store-DmVqy74I.js} +13 -7
- package/dist/{store-options-Dil3lraY.js → store-options--zWn48PK.js} +76 -7
- package/dist/{stores-DxZWDXCs.js → stores-BYFopOm1.js} +3 -3
- package/dist/{stores-DZJvxFIZ.d.ts → stores-EPul_8MN.d.ts} +5 -6
- package/dist/{stream-9y9qw51m.d.ts → stream-W2RuUYly.d.ts} +1 -1
- package/dist/{subject-BGoM5o8B.js → subject-C7RddW0G.js} +8 -1
- package/dist/supabase/client.d.ts +2 -0
- package/dist/supabase/client.js +21 -0
- package/dist/supabase/index.d.ts +37 -6
- package/dist/supabase/index.js +6 -5
- package/dist/supabase/middleware.d.ts +8 -7
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-CDHMsDD0.js → supabase-BiViJpQ4.js} +31 -8
- package/dist/{supabase-DYWnT800.js → supabase-CogTyJH2.js} +3 -3
- package/dist/supabase-hook-BN46IrVI.js +1 -0
- package/dist/{supabase-hook-HPgwYb9V.js → supabase-hook-DX38Hj8h.js} +393 -32
- package/dist/{supautils-SwE642N1.js → supautils-BGf6zRvM.js} +12 -12
- package/dist/svelte/index.d.ts +7 -7
- package/dist/svelte/index.js +8 -8
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +3 -3
- package/dist/svelte/source.d.ts +7 -7
- package/dist/svelte/source.js +5 -5
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-DimBcVWY.js → tables-BfOk0ymL.js} +7 -7
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenancy-5d1zVBvK.js → tenancy-DvOHHk3-.js} +1 -1
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +6 -6
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +1 -1
- package/dist/testing/fixtures/index.js +2 -2
- package/dist/testing/index.d.ts +29 -22
- package/dist/testing/index.js +120 -48
- 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/token-D6pWn8Uj.d.ts +11 -0
- package/dist/{token-DC9EQiet.js → token-DaMnIU9O.js} +24 -8
- package/dist/{tool-refusal-Qpjs_W6M.js → tool-refusal-D4spOJ7I.js} +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +3 -3
- package/dist/{type-helpers-c7Xo_2Cu.d.ts → type-helpers-i1EJ3Eb1.d.ts} +1 -1
- package/dist/{types-Cklw5hJo.d.ts → types-3Y8UpFkF.d.ts} +40 -1
- package/dist/{types-DlelvQk4.d.ts → types-B8qUkGja.d.ts} +2 -2
- package/dist/{types-CN0LsqbK.d.ts → types-CCEeSCMB.d.ts} +3 -3
- package/dist/{types-B2efzoSX.d.ts → types-CDVXR6YD.d.ts} +1 -1
- package/dist/{types-DsHGPtkR.d.ts → types-Ck1KOfug.d.ts} +2 -2
- package/dist/{types-DLvhVm1r.d.ts → types-CqcsNCaN.d.ts} +16 -7
- package/dist/{types-BB-zWDcR.d.ts → types-D-JO7lh8.d.ts} +5 -5
- package/dist/{types-CEinc15V.d.ts → types-D19MK4t-.d.ts} +3 -4
- package/dist/{types-B6ExllNo.d.ts → types-DGf_cpKF.d.ts} +2 -2
- package/dist/{types-rCRV4Ge-.d.ts → types-DmbfLu2p.d.ts} +4 -4
- package/dist/{types-ZzRGoViD.d.ts → types-NYoj8JBm.d.ts} +2 -2
- package/dist/{types-CWBsAwqn.d.ts → types-o1vu6Ks3.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +2 -2
- package/dist/usage-Cl5eb-e1.js +1 -0
- package/dist/{usage-CPXeuAdT.js → usage-DC0UKe6C.js} +6 -6
- package/dist/{usage-CfZCQd0F.js → usage-DYtRVkcN.js} +2 -2
- package/dist/{validation-error-uvp-kyfO.d.ts → validation-error-Dx8PipbO.d.ts} +1 -1
- package/dist/{verify-DfT0QYNh.js → verify-Bpj0hauG.js} +19 -19
- package/dist/{version-cache-Df11C2Qp.d.ts → version-cache-DzNKWiI6.d.ts} +9 -3
- package/dist/{views-CD8wuL4Z.js → views-MWmJ6Y4P.js} +1 -1
- package/dist/vue/index.d.ts +7 -7
- package/dist/vue/index.js +6 -6
- package/dist/{waiter-CqUKX6CY.d.ts → waiter-NK_UuZbb.d.ts} +2 -2
- package/dist/{watch-DAkjm75Y.js → watch-CBHADqBH.js} +3 -3
- package/dist/watch-OYwAPCzx.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/{where-scope-DlCdCM_8.js → where-scope-BKrqUDVk.js} +5 -5
- package/dist/{who-can-BoDJm0Nc.js → who-can-KhVWMxtf.js} +4 -4
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +5 -4
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-DxXB54Wu.d.ts → wrap-BHGA-SMM.d.ts} +2 -2
- package/dist/{wrap-B2wziJI_.js → wrap-C5PWzgkq.js} +1 -1
- package/package.json +8 -5
- package/schemas/approval-request-v1.json +5 -0
- package/schemas/catalog-v1.json +18 -2
- package/schemas/cli-result-v1.json +0 -2
- package/schemas/snapshot-v1.json +9 -0
- package/schemas/supabase-manifest-v1.json +1 -1
- package/skills/permdock-approvals/SKILL.md +8 -8
- package/skills/permdock-approvals/references/stores-and-resume.md +7 -3
- package/skills/permdock-audit/SKILL.md +1 -1
- package/skills/permdock-wire/references/adapters.md +3 -1
- package/dist/action-result-BcudBQOF.d.ts +0 -19
- package/dist/catalog-D3oS2GH3.js +0 -1
- package/dist/collect-D-eroIfV.js +0 -1
- package/dist/load-Dm0pSYH3.js +0 -1
- package/dist/output-files-BHOIlrfD.js +0 -1
- package/dist/powersync-0QVP_DuR.js +0 -1
- package/dist/pull-CCAChKuy.js +0 -1
- package/dist/renames-CGj7YwcQ.js +0 -175
- package/dist/run-C5P3x1EI.js +0 -1
- package/dist/supabase-hook-qsewAVZY.js +0 -1
- package/dist/usage-DmmO_xjJ.js +0 -1
- package/dist/watch-CuPz0D2M.js +0 -1
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
import { r as isRecord, t as compact } from "../compact-CAf557ZB.js";
|
|
3
3
|
import { n as freezeDeep } from "../freeze-jjan0lCv.js";
|
|
4
4
|
import { r as requiredPlans } from "../problem-details-CLDgX1KV.js";
|
|
5
|
-
import { n as describe } from "../describe-
|
|
5
|
+
import { n as describe } from "../describe-BZAlPHxT.js";
|
|
6
6
|
import { n as isThenable } from "../thenable-BNSM1U2R.js";
|
|
7
7
|
import { h as secondsAt, m as rfc3339 } from "../time-nR1JesoH.js";
|
|
8
|
-
import {
|
|
8
|
+
import { d as scopeList, o as normalizeMemberships, p as tenantOf$1, s as resolveScope } from "../scopes-BSdYaGHs.js";
|
|
9
9
|
import { o as flattenGrantee } from "../grantee-Dke-9rd1.js";
|
|
10
10
|
import { t as byCodePoint } from "../compare-DTfyUunF.js";
|
|
11
|
-
import { d as resolveActiveTenant, r as isMembershipExpired } from "../tenancy-
|
|
12
|
-
import { a as bindConditionRefs, n as parseSnapshot } from "../snapshot-
|
|
13
|
-
import { r as heldRoleNames, t as emptySnapshot } from "../from-snapshot-
|
|
14
|
-
import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-
|
|
15
|
-
import { r as approvalHeaders } from "../protected-action-
|
|
16
|
-
import {
|
|
11
|
+
import { d as resolveActiveTenant, r as isMembershipExpired } from "../tenancy-DvOHHk3-.js";
|
|
12
|
+
import { a as bindConditionRefs, n as parseSnapshot } from "../snapshot-DN_8J27z.js";
|
|
13
|
+
import { r as heldRoleNames, t as emptySnapshot } from "../from-snapshot-DMlSSo9b.js";
|
|
14
|
+
import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-CxcSMQgl.js";
|
|
15
|
+
import { r as approvalHeaders } from "../protected-action-OpOxtTsN.js";
|
|
16
|
+
import { a as eventSourceRefresh, c as isJws, n as storeOf, r as authzChangeRefresh, t as adapterStore } from "../store-options--zWn48PK.js";
|
|
17
17
|
import { a as PermDockUiContext, i as PermDockStoreContext, n as useKeyed, t as useLiveOptions } from "../live-options-BBIT68le.js";
|
|
18
|
-
import { a as useAssignableRoles, c as useGate, d as usePermission, f as usePermissions,
|
|
18
|
+
import { a as useAssignableRoles, c as useGate, d as usePermission, f as usePermissions, g as useTenant, h as useSubject, i as useAssignablePermissions, l as useMemberships, m as useRoles, n as Protected, o as useDescribe, r as useApproval, s as useFilter, t as useProtectedAction, u as usePermDock } from "../protected-action-B40tU3yP.js";
|
|
19
|
+
import { r as authzUserTopic, t as AUTHZ_EVENT } from "../authz-topic-Dbc-HDOS.js";
|
|
19
20
|
import { useEffect, useMemo, useRef } from "react";
|
|
20
21
|
import { jsx } from "react/jsx-runtime";
|
|
21
22
|
//#region src/react-native/guards.ts
|
|
@@ -316,7 +317,8 @@ function buildLocalSnapshot(manifest, data, at) {
|
|
|
316
317
|
customRoles: tenantCustom
|
|
317
318
|
})],
|
|
318
319
|
scopes: manifest.scopes,
|
|
319
|
-
vocabulary: manifest.vocabulary
|
|
320
|
+
vocabulary: manifest.vocabulary,
|
|
321
|
+
authzVersion: Number.isSafeInteger(data.authzVersion) && (data.authzVersion ?? -1) >= 0 ? data.authzVersion : void 0
|
|
320
322
|
}));
|
|
321
323
|
}
|
|
322
324
|
/**
|
|
@@ -334,6 +336,7 @@ function localSnapshot(options) {
|
|
|
334
336
|
function isColumns(roles) {
|
|
335
337
|
return Array.isArray(roles);
|
|
336
338
|
}
|
|
339
|
+
/** A SQLite identifier in double quotes. */
|
|
337
340
|
function quoted(name) {
|
|
338
341
|
return `"${name.replaceAll("\"", "\"\"")}"`;
|
|
339
342
|
}
|
|
@@ -359,6 +362,7 @@ function rowTables(rows) {
|
|
|
359
362
|
tables.add(rows.customRoles.permissions);
|
|
360
363
|
tables.add(rows.customRoles.includes);
|
|
361
364
|
}
|
|
365
|
+
if (rows.version !== void 0) tables.add(rows.version.table);
|
|
362
366
|
return [...tables];
|
|
363
367
|
}
|
|
364
368
|
function rowQuery(table) {
|
|
@@ -495,8 +499,21 @@ function customRolesOf(permissions, includes) {
|
|
|
495
499
|
return [...roles.values()].map(customRoleOf);
|
|
496
500
|
}
|
|
497
501
|
/**
|
|
498
|
-
* The user's
|
|
499
|
-
*
|
|
502
|
+
* The highest version on the user's rows of the version table. SQLite returns a
|
|
503
|
+
* `bigint` column as a number, or as text past 2^53.
|
|
504
|
+
*/
|
|
505
|
+
function versionOf(table, tables, user) {
|
|
506
|
+
if (table === void 0) return;
|
|
507
|
+
let found;
|
|
508
|
+
for (const row of rowsOf(tables, table.table)) {
|
|
509
|
+
const value = Number(text(row[table.version]));
|
|
510
|
+
if (text(row[table.user]) === user && Number.isSafeInteger(value) && value >= 0 && (found === void 0 || value > found)) found = value;
|
|
511
|
+
}
|
|
512
|
+
return found;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* The user's memberships, global roles, custom roles and authorization version
|
|
516
|
+
* from the rows of the tables `rows` names.
|
|
500
517
|
*/
|
|
501
518
|
function readRows(rows, tables, principal) {
|
|
502
519
|
const { id: user, tenant, attributes } = principal;
|
|
@@ -507,7 +524,9 @@ function readRows(rows, tables, principal) {
|
|
|
507
524
|
return key === void 0 ? [] : [key];
|
|
508
525
|
}) : []);
|
|
509
526
|
const custom = rows.customRoles;
|
|
527
|
+
const authzVersion = versionOf(rows.version, tables, user);
|
|
510
528
|
return {
|
|
529
|
+
...authzVersion === void 0 ? {} : { authzVersion },
|
|
511
530
|
principal: {
|
|
512
531
|
id: user,
|
|
513
532
|
roles: [...new Set(roles)].toSorted(),
|
|
@@ -649,6 +668,173 @@ function powerSyncSourceCache(db) {
|
|
|
649
668
|
} });
|
|
650
669
|
}
|
|
651
670
|
//#endregion
|
|
671
|
+
//#region src/react-native/subscriptions.ts
|
|
672
|
+
/**
|
|
673
|
+
* `subscribeForeground` over `AppState`: `active` returns to the foreground and
|
|
674
|
+
* `background` leaves it. iOS `inactive` (a system sheet over the app) is
|
|
675
|
+
* neither.
|
|
676
|
+
*/
|
|
677
|
+
function appStateForeground(appState) {
|
|
678
|
+
return (listener) => {
|
|
679
|
+
const subscription = appState.addEventListener("change", (state) => {
|
|
680
|
+
if (state === "active") listener(true);
|
|
681
|
+
else if (state === "background") listener(false);
|
|
682
|
+
});
|
|
683
|
+
return () => {
|
|
684
|
+
subscription.remove();
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* `subscribeOnline` over NetInfo. An unknown (`null`) connection counts as
|
|
690
|
+
* online.
|
|
691
|
+
*/
|
|
692
|
+
function netInfoOnline(netInfo) {
|
|
693
|
+
return (listener) => netInfo.addEventListener((state) => {
|
|
694
|
+
listener(state.isConnected !== false && state.isInternetReachable !== false);
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
//#endregion
|
|
698
|
+
//#region src/react-native/native-refresh.ts
|
|
699
|
+
/** The `authz_ver` claim of an access token, read without verifying it. */
|
|
700
|
+
function tokenVersion(token) {
|
|
701
|
+
const payload = token.split(".")[1];
|
|
702
|
+
if (payload === void 0) return;
|
|
703
|
+
try {
|
|
704
|
+
const base64 = payload.replaceAll("-", "+").replaceAll("_", "/");
|
|
705
|
+
const claims = JSON.parse(atob(base64.padEnd(Math.ceil(base64.length / 4) * 4, "=")));
|
|
706
|
+
const version = isRecord(claims) ? claims["authz_ver"] : void 0;
|
|
707
|
+
return typeof version === "number" && Number.isSafeInteger(version) && version >= 0 ? version : void 0;
|
|
708
|
+
} catch {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
function highest(rows) {
|
|
713
|
+
let found;
|
|
714
|
+
for (const row of rows) {
|
|
715
|
+
const value = Number(isRecord(row) ? row["version"] : void 0);
|
|
716
|
+
if (Number.isSafeInteger(value) && value >= 0 && (found === void 0 || value > found)) found = value;
|
|
717
|
+
}
|
|
718
|
+
return found;
|
|
719
|
+
}
|
|
720
|
+
async function currentSession(supabase) {
|
|
721
|
+
try {
|
|
722
|
+
return (await supabase.auth.getSession()).data.session;
|
|
723
|
+
} catch {
|
|
724
|
+
return null;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* A `refreshOn` trigger for an Expo app on Supabase: on each message on the
|
|
729
|
+
* user's private `authz:<uid>` topic it refreshes the Supabase session, then
|
|
730
|
+
* reconnects PowerSync so streams that read token claims see the new ones, then
|
|
731
|
+
* refreshes the snapshot. Passes run one at a time; signals during a pass fold
|
|
732
|
+
* into one more. The channel closes in the background and rejoins on
|
|
733
|
+
* foreground, where one catch-up pass runs: a version check with
|
|
734
|
+
* `powersync.manifest`, else a full pass. It never imports `@supabase/*` or
|
|
735
|
+
* `@powersync/*`.
|
|
736
|
+
*/
|
|
737
|
+
function nativeRefresh(options) {
|
|
738
|
+
const { supabase, powersync } = options;
|
|
739
|
+
const versionRows = powersync?.manifest?.rows?.version;
|
|
740
|
+
return (refresh) => {
|
|
741
|
+
let closed = false;
|
|
742
|
+
let online = true;
|
|
743
|
+
let held = false;
|
|
744
|
+
let running = false;
|
|
745
|
+
let again = false;
|
|
746
|
+
let channel;
|
|
747
|
+
let joins = 0;
|
|
748
|
+
let watching;
|
|
749
|
+
const pass = async () => {
|
|
750
|
+
try {
|
|
751
|
+
await supabase.auth.refreshSession();
|
|
752
|
+
if (powersync !== void 0) {
|
|
753
|
+
await powersync.db.disconnect();
|
|
754
|
+
await powersync.db.connect(powersync.connector);
|
|
755
|
+
}
|
|
756
|
+
} catch {}
|
|
757
|
+
if (!closed) refresh();
|
|
758
|
+
};
|
|
759
|
+
const signal = () => {
|
|
760
|
+
if (closed) return;
|
|
761
|
+
if (!online) {
|
|
762
|
+
held = true;
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
765
|
+
if (running) {
|
|
766
|
+
again = true;
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
running = true;
|
|
770
|
+
pass().finally(() => {
|
|
771
|
+
running = false;
|
|
772
|
+
if (again) {
|
|
773
|
+
again = false;
|
|
774
|
+
signal();
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
};
|
|
778
|
+
const versionSql = versionRows === void 0 ? void 0 : `SELECT ${quoted(versionRows.version)} AS version FROM ${quoted(versionRows.table)} WHERE ${quoted(versionRows.user)} = ?`;
|
|
779
|
+
const checkVersion = async () => {
|
|
780
|
+
if (versionSql === void 0 || powersync === void 0) return;
|
|
781
|
+
const current = await currentSession(supabase);
|
|
782
|
+
if (current === null || closed) return;
|
|
783
|
+
const token = tokenVersion(current.access_token);
|
|
784
|
+
try {
|
|
785
|
+
const synced = highest(await powersync.db.getAll(versionSql, [current.user.id]));
|
|
786
|
+
if (token !== void 0 && synced !== void 0 && synced > token) signal();
|
|
787
|
+
} catch {}
|
|
788
|
+
};
|
|
789
|
+
const leave = () => {
|
|
790
|
+
joins += 1;
|
|
791
|
+
if (channel !== void 0) {
|
|
792
|
+
supabase.removeChannel(channel);
|
|
793
|
+
channel = void 0;
|
|
794
|
+
}
|
|
795
|
+
};
|
|
796
|
+
const join = async () => {
|
|
797
|
+
joins += 1;
|
|
798
|
+
const generation = joins;
|
|
799
|
+
const current = await currentSession(supabase);
|
|
800
|
+
if (closed || generation !== joins || current === null) return;
|
|
801
|
+
channel = supabase.channel(authzUserTopic(current.user.id), { config: { private: true } });
|
|
802
|
+
channel.on("broadcast", { event: AUTHZ_EVENT }, () => {
|
|
803
|
+
signal();
|
|
804
|
+
});
|
|
805
|
+
channel.subscribe();
|
|
806
|
+
if (versionSql !== void 0 && powersync !== void 0 && watching === void 0) {
|
|
807
|
+
watching = new AbortController();
|
|
808
|
+
powersync.db.watch(versionSql, [current.user.id], { onResult: () => {
|
|
809
|
+
checkVersion();
|
|
810
|
+
} }, { signal: watching.signal });
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
join();
|
|
814
|
+
const offForeground = appStateForeground(options.appState)((active) => {
|
|
815
|
+
leave();
|
|
816
|
+
if (active === false) return;
|
|
817
|
+
join();
|
|
818
|
+
if (versionSql === void 0) signal();
|
|
819
|
+
else checkVersion();
|
|
820
|
+
});
|
|
821
|
+
const offOnline = options.netInfo === void 0 ? void 0 : netInfoOnline(options.netInfo)((next) => {
|
|
822
|
+
online = next;
|
|
823
|
+
if (next && held) {
|
|
824
|
+
held = false;
|
|
825
|
+
signal();
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
return () => {
|
|
829
|
+
closed = true;
|
|
830
|
+
leave();
|
|
831
|
+
offForeground();
|
|
832
|
+
offOnline?.();
|
|
833
|
+
watching?.abort();
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
//#endregion
|
|
652
838
|
//#region src/react-native/storage.ts
|
|
653
839
|
const SNAPSHOT_KEY = "permdock.snapshot";
|
|
654
840
|
const TENANT_KEY = "permdock.tenant";
|
|
@@ -1099,31 +1285,4 @@ function mmkvStorage(mmkv) {
|
|
|
1099
1285
|
};
|
|
1100
1286
|
}
|
|
1101
1287
|
//#endregion
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* `subscribeForeground` over `AppState`: `active` returns to the foreground and
|
|
1105
|
-
* `background` leaves it. iOS `inactive` (a system sheet over the app) is
|
|
1106
|
-
* neither.
|
|
1107
|
-
*/
|
|
1108
|
-
function appStateForeground(appState) {
|
|
1109
|
-
return (listener) => {
|
|
1110
|
-
const subscription = appState.addEventListener("change", (state) => {
|
|
1111
|
-
if (state === "active") listener(true);
|
|
1112
|
-
else if (state === "background") listener(false);
|
|
1113
|
-
});
|
|
1114
|
-
return () => {
|
|
1115
|
-
subscription.remove();
|
|
1116
|
-
};
|
|
1117
|
-
};
|
|
1118
|
-
}
|
|
1119
|
-
/**
|
|
1120
|
-
* `subscribeOnline` over NetInfo. An unknown (`null`) connection counts as
|
|
1121
|
-
* online.
|
|
1122
|
-
*/
|
|
1123
|
-
function netInfoOnline(netInfo) {
|
|
1124
|
-
return (listener) => netInfo.addEventListener((state) => {
|
|
1125
|
-
listener(state.isConnected !== false && state.isInternetReachable !== false);
|
|
1126
|
-
});
|
|
1127
|
-
}
|
|
1128
|
-
//#endregion
|
|
1129
|
-
export { PermDockProvider, Protected, appStateForeground, approvalHeaders, buildLocalSnapshot, connectSource, describe, eventSourceRefresh, localSnapshot, memorySnapshotStorage, mmkvStorage, nativeStore, netInfoOnline, parseLocalSnapshotManifest, powerSyncSource, powerSyncSourceCache, requiredPlans, secureStoreStorage, useApproval, useAssignablePermissions, useAssignableRoles, useDescribe, useFilter, useGate, useMemberships, usePermDock, usePermission, usePermissionGuard, usePermissions, useProtectedAction, useRoles, useSnapshotReady, useSubject, useTenant };
|
|
1288
|
+
export { PermDockProvider, Protected, appStateForeground, approvalHeaders, authzChangeRefresh, buildLocalSnapshot, connectSource, describe, eventSourceRefresh, localSnapshot, memorySnapshotStorage, mmkvStorage, nativeRefresh, nativeStore, netInfoOnline, parseLocalSnapshotManifest, powerSyncSource, powerSyncSourceCache, requiredPlans, secureStoreStorage, useApproval, useAssignablePermissions, useAssignableRoles, useDescribe, useFilter, useGate, useMemberships, usePermDock, usePermission, usePermissionGuard, usePermissions, useProtectedAction, useRoles, useSnapshotReady, useSubject, useTenant };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//#region src/client/refresh-on.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Calls `refresh` when the snapshot may be out of date (a membership event, a
|
|
4
|
+
* window focus, a realtime message) and returns the unsubscribe. A refresh
|
|
5
|
+
* re-fetches the signed snapshot; it never grants by itself.
|
|
6
|
+
*/
|
|
7
|
+
type RefreshTrigger = (refresh: () => void) => () => void;
|
|
8
|
+
type EventSourceRefreshOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* CloudEvent `type` values that refresh; a trailing `*` matches a prefix.
|
|
11
|
+
* Defaults to `com.permdock.membership.*` and `com.permdock.catalog.*`.
|
|
12
|
+
*/
|
|
13
|
+
readonly types?: readonly string[];
|
|
14
|
+
readonly withCredentials?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A `refreshOn` trigger over Server-Sent Events: each `message` whose data is a
|
|
18
|
+
* structured CloudEvent with a matching `type` refreshes the snapshot. Without
|
|
19
|
+
* a global `EventSource` it never fires.
|
|
20
|
+
*/
|
|
21
|
+
declare function eventSourceRefresh(url: string, options?: EventSourceRefreshOptions): RefreshTrigger;
|
|
22
|
+
/** A `refreshOn` trigger on window `focus`. Without a window it never fires. */
|
|
23
|
+
declare function focusRefresh(): RefreshTrigger;
|
|
24
|
+
/**
|
|
25
|
+
* A `refreshOn` trigger on `visibilitychange` to visible, when a background tab
|
|
26
|
+
* comes back. Without a `document` it never fires.
|
|
27
|
+
*/
|
|
28
|
+
declare function visibilityRefresh(): RefreshTrigger;
|
|
29
|
+
/**
|
|
30
|
+
* A `refreshOn` trigger on every message to the `BroadcastChannel` `name`, so
|
|
31
|
+
* one tab that learns of a change refreshes the others. Without a global
|
|
32
|
+
* `BroadcastChannel` it never fires.
|
|
33
|
+
*/
|
|
34
|
+
declare function broadcastChannelRefresh(name: string): RefreshTrigger;
|
|
35
|
+
type AuthzChangeRefresh = {
|
|
36
|
+
/** Pass to `refreshOn`. */
|
|
37
|
+
readonly trigger: RefreshTrigger;
|
|
38
|
+
/** Pass to better-supabase's `<SessionProvider onAuthzChange>`. */
|
|
39
|
+
readonly notify: () => void;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A `refreshOn` trigger that fires on `notify()`. better-supabase's
|
|
43
|
+
* `SessionProvider` already listens on the user's `authz:<uid>` topic and
|
|
44
|
+
* shares changes across tabs, so `onAuthzChange={notify}` refreshes the
|
|
45
|
+
* snapshot without a second Realtime channel.
|
|
46
|
+
*/
|
|
47
|
+
declare function authzChangeRefresh(): AuthzChangeRefresh;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { broadcastChannelRefresh as a, visibilityRefresh as c, authzChangeRefresh as i, EventSourceRefreshOptions as n, eventSourceRefresh as o, RefreshTrigger as r, focusRefresh as s, AuthzChangeRefresh as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as assertAppData } from "./app-data-UNNm07jV.js";
|
|
2
|
-
import { n as wrapPermDock } from "./wrap-
|
|
3
|
-
import { t as buildInstance } from "./build-instance-
|
|
2
|
+
import { n as wrapPermDock } from "./wrap-C5PWzgkq.js";
|
|
3
|
+
import { t as buildInstance } from "./build-instance-BFMFQdE_.js";
|
|
4
4
|
//#region src/core/request-context.ts
|
|
5
5
|
/**
|
|
6
6
|
* Errors an adapter raises around one instance (a `context` hook that threw, an
|
|
@@ -81,6 +81,11 @@ const APPROVAL_REQUEST_SCHEMA = {
|
|
|
81
81
|
vouched: { type: "string" },
|
|
82
82
|
note: { type: "string" },
|
|
83
83
|
consumedAt: { $ref: "#/$defs/instant" },
|
|
84
|
+
fingerprint: {
|
|
85
|
+
type: "string",
|
|
86
|
+
pattern: "^[0-9a-f]{64}$",
|
|
87
|
+
description: "The approvalFingerprint the request was opened under; a resume under another one is refused."
|
|
88
|
+
},
|
|
84
89
|
x: {
|
|
85
90
|
type: "object",
|
|
86
91
|
description: "The application's own data, set when the request opens: plain JSON, never read by a decision."
|
package/dist/resend/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ApprovalUrl, t as ApprovalPrompt } from "../approval-prompt-
|
|
3
|
-
import { d as EmailTransport, o as DeliveryResult, u as EmailMessage } from "../types-
|
|
4
|
-
import { l as ReplayStore } from "../types-
|
|
1
|
+
import { Y as DecisionSink } from "../policy-types-D-GwfQTc.js";
|
|
2
|
+
import { n as ApprovalUrl, t as ApprovalPrompt } from "../approval-prompt-Bg7gDSqd.js";
|
|
3
|
+
import { d as EmailTransport, o as DeliveryResult, u as EmailMessage } from "../types-CCEeSCMB.js";
|
|
4
|
+
import { l as ReplayStore } from "../types-Ck1KOfug.js";
|
|
5
5
|
//#region src/resend/approval-email.d.ts
|
|
6
6
|
type ApprovalEmailOptions = {
|
|
7
7
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
2
2
|
import { c as listPermissions } from "./permission-registry-B8tYxPIt.js";
|
|
3
|
-
import {
|
|
4
|
-
import { i as configError } from "./errors-
|
|
5
|
-
import "./budget-
|
|
3
|
+
import { d as scopeList } from "./scopes-BSdYaGHs.js";
|
|
4
|
+
import { i as configError } from "./errors-BhRkoNS7.js";
|
|
5
|
+
import "./budget-BBCPDOGP.js";
|
|
6
6
|
import "./sources-C4vkzZJV.js";
|
|
7
|
-
import { A as quoteQualified, D as qualified, I as scopeTypeOf, O as quoteIdent } from "./shared-
|
|
8
|
-
import { F as globalRoleRows, Q as graphSqlName, Z as graphHelper, _ as PERMISSION_HELPERS, at as memberForHelper, c as holderSources, ct as memberIdsHelper, dt as permittedForHelper, ft as permittedIdsHelper, ht as scopeTable, lt as memberOfHelper, nt as inheritedRowsHelper, o as graphPlan, pt as restrictedHelper, r as tableNames, rt as isTeamScope, tt as hasPermittedUsers, v as checkName, x as permittedByPermissionHelper } from "./tables-
|
|
9
|
-
import { t as FIELD_VIEWS } from "./fields-
|
|
7
|
+
import { A as quoteQualified, D as qualified, I as scopeTypeOf, O as quoteIdent } from "./shared-DyYVEjKC.js";
|
|
8
|
+
import { F as globalRoleRows, Q as graphSqlName, Z as graphHelper, _ as PERMISSION_HELPERS, at as memberForHelper, c as holderSources, ct as memberIdsHelper, dt as permittedForHelper, ft as permittedIdsHelper, ht as scopeTable, lt as memberOfHelper, nt as inheritedRowsHelper, o as graphPlan, pt as restrictedHelper, r as tableNames, rt as isTeamScope, tt as hasPermittedUsers, v as checkName, x as permittedByPermissionHelper } from "./tables-BfOk0ymL.js";
|
|
9
|
+
import { t as FIELD_VIEWS } from "./fields-CrjL6A49.js";
|
|
10
10
|
//#region src/cli/rls/permission-holders.ts
|
|
11
11
|
/**
|
|
12
12
|
* `permitted_<scope>_users(p_permission, p_id)`. Names are part of the SQL
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { c as listPermissions, u as renamedKeys } from "./permission-registry-B8tYxPIt.js";
|
|
3
3
|
import { i as dateAt } from "./time-nR1JesoH.js";
|
|
4
|
-
import { p as scopeField } from "./tenancy-
|
|
5
|
-
import { a as describeError, i as configError, o as exitCodeOfError, u as usageResult } from "./errors-
|
|
4
|
+
import { p as scopeField } from "./tenancy-DvOHHk3-.js";
|
|
5
|
+
import { a as describeError, i as configError, o as exitCodeOfError, u as usageResult } from "./errors-BhRkoNS7.js";
|
|
6
6
|
import { t as policyRowConditionKeys } from "./row-conditions-BAGHOmVq.js";
|
|
7
7
|
import { o as sqlFiles } from "./files-BSjrtIHw.js";
|
|
8
|
-
import { c as requirePolicy } from "./load-
|
|
8
|
+
import { c as requirePolicy } from "./load-BaEamml-.js";
|
|
9
9
|
import { i as qualifySqlTable, r as escapeSqlIdent } from "./sql-0WjxIp9g.js";
|
|
10
10
|
import "./sources-C4vkzZJV.js";
|
|
11
|
-
import { t as policyFromCatalog } from "./policy-from-catalog-
|
|
11
|
+
import { t as policyFromCatalog } from "./policy-from-catalog-B68hGC0S.js";
|
|
12
12
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
13
13
|
import { i as INDEXES_MARKER, n as GRANTS_MARKER, o as SEEDS_MARKER, t as BACKFILL_MARKER } from "./markers-BeHZ4x9Q.js";
|
|
14
|
-
import { a as nonEmptyOr } from "./output-
|
|
15
|
-
import { i as requirePeer, n as packageManagerOf, t as addLine } from "./peer-
|
|
14
|
+
import { a as nonEmptyOr } from "./output-BFWLER4r.js";
|
|
15
|
+
import { i as requirePeer, n as packageManagerOf, t as addLine } from "./peer-BuK9F53f.js";
|
|
16
16
|
import { t as POLICY_NOT_PUBLISHED } from "./problem-types-DSsRfONQ.js";
|
|
17
|
-
import { t as fetchProjectPolicy } from "./pull-
|
|
17
|
+
import { t as fetchProjectPolicy } from "./pull-DLP4I1Kl.js";
|
|
18
18
|
import { n as MIGRATION_DIRS } from "./constants-DcJABbLW.js";
|
|
19
|
-
import { a as isSeedsDirectory, c as parseSplit, d as seedsMigration, f as writeOutputFiles, l as partPath, n as dataMigrationFile, r as driftOf, u as pgDeltaPath } from "./output-files-
|
|
20
|
-
import { b as rbacScaffold, d as resolveSchemas, f as schemasRefusal, o as supabaseHookSql, p as declarativeSql, s as approvalsSql, t as grantsLabel, u as isSupabaseSchemas, y as parseRbacAuthorize } from "./supabase-hook-
|
|
21
|
-
import { A as quoteQualified, D as qualified$1, I as scopeTypeOf, O as quoteIdent$1, _ as subjectClaimJsonSql, c as SESSION_LIVE_HELPER, g as sessionLiveHelperSql, j as quoteTable, k as quoteLiteral, r as HELPERS, t as CUSTOM_ROLES, y as subjectIdSql } from "./shared-
|
|
22
|
-
import { C as accessSql, G as byKey, T as seedSql, Z as graphHelper, ct as memberIdsHelper, ft as permittedIdsHelper, ht as scopeTable, mt as scopeSources, r as tableNames, s as graphSql, w as helpersSql, x as permittedByPermissionHelper, y as permissionHelpersSql } from "./tables-
|
|
23
|
-
import { c as breakGlassKey, i as assignmentSql, l as collectGrants, n as ownershipSql, s as breakGlassHolder } from "./ownership-
|
|
19
|
+
import { a as isSeedsDirectory, c as parseSplit, d as seedsMigration, f as writeOutputFiles, l as partPath, n as dataMigrationFile, r as driftOf, u as pgDeltaPath } from "./output-files-CM0BnH05.js";
|
|
20
|
+
import { b as rbacScaffold, d as resolveSchemas, f as schemasRefusal, o as supabaseHookSql, p as declarativeSql, s as approvalsSql, t as grantsLabel, u as isSupabaseSchemas, y as parseRbacAuthorize } from "./supabase-hook-DX38Hj8h.js";
|
|
21
|
+
import { A as quoteQualified, D as qualified$1, I as scopeTypeOf, O as quoteIdent$1, _ as subjectClaimJsonSql, c as SESSION_LIVE_HELPER, g as sessionLiveHelperSql, j as quoteTable, k as quoteLiteral, r as HELPERS, t as CUSTOM_ROLES, y as subjectIdSql } from "./shared-DyYVEjKC.js";
|
|
22
|
+
import { C as accessSql, G as byKey, T as seedSql, Z as graphHelper, ct as memberIdsHelper, ft as permittedIdsHelper, ht as scopeTable, mt as scopeSources, r as tableNames, s as graphSql, w as helpersSql, x as permittedByPermissionHelper, y as permissionHelpersSql } from "./tables-BfOk0ymL.js";
|
|
23
|
+
import { c as breakGlassKey, i as assignmentSql, l as collectGrants, n as ownershipSql, s as breakGlassHolder } from "./ownership-D-mIt-w0.js";
|
|
24
24
|
import { a as splitUndiffed } from "./deciding-columns-NB4wcyBf.js";
|
|
25
|
-
import { t as connectPgPool } from "./pg-
|
|
26
|
-
import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, f as readOnlyActorKinds, i as fieldViews, l as actorMayWriteSql, n as columnGrantSql, o as rowBranches, p as readOnlyActorPolicies, r as columnRevokeSql, u as assemblePolicies } from "./fields-
|
|
27
|
-
import { n as permissionHoldersSql } from "./resolve-names-
|
|
28
|
-
import { _ as indexTargets, a as verifyResult, b as readTableIndexFacts, c as callsHelper, g as INDEX_COLUMNS_SQL, h as COLUMNS_SQL, i as verifyIgnores, l as helperCallKeys, m as tableFor, n as runRlsVerify, o as HELPER_TABLES, p as compileGrants, r as rlsFinding, v as indexesSql, y as pruneIndexTargets } from "./verify-
|
|
29
|
-
import { a as buildContext, c as levelKeys, d as rebuildPlan, i as splitsPart, l as rowHelpersSql, n as generateOptions, o as CANDIDATES, r as isRefusal, s as inheritTargets, t as supautilsRejections, u as DROPPED_LIST } from "./supautils-
|
|
25
|
+
import { t as connectPgPool } from "./pg-Ddxsd5ZB.js";
|
|
26
|
+
import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, f as readOnlyActorKinds, i as fieldViews, l as actorMayWriteSql, n as columnGrantSql, o as rowBranches, p as readOnlyActorPolicies, r as columnRevokeSql, u as assemblePolicies } from "./fields-CrjL6A49.js";
|
|
27
|
+
import { n as permissionHoldersSql } from "./resolve-names-CBl4r4_r.js";
|
|
28
|
+
import { _ as indexTargets, a as verifyResult, b as readTableIndexFacts, c as callsHelper, g as INDEX_COLUMNS_SQL, h as COLUMNS_SQL, i as verifyIgnores, l as helperCallKeys, m as tableFor, n as runRlsVerify, o as HELPER_TABLES, p as compileGrants, r as rlsFinding, v as indexesSql, y as pruneIndexTargets } from "./verify-Bpj0hauG.js";
|
|
29
|
+
import { a as buildContext, c as levelKeys, d as rebuildPlan, i as splitsPart, l as rowHelpersSql, n as generateOptions, o as CANDIDATES, r as isRefusal, s as inheritTargets, t as supautilsRejections, u as DROPPED_LIST } from "./supautils-BGf6zRvM.js";
|
|
30
30
|
import { readFileSync } from "node:fs";
|
|
31
31
|
import { basename, delimiter, join } from "node:path";
|
|
32
32
|
import { spawn } from "node:child_process";
|
|
@@ -1601,7 +1601,7 @@ function generateSql(input, policy, options, built, warnings) {
|
|
|
1601
1601
|
const checked = preflight(input, built);
|
|
1602
1602
|
if (isRefusal(checked)) return checked;
|
|
1603
1603
|
const { jsonSchema } = checked;
|
|
1604
|
-
if (jsonSchema !== void 0 && jsonSchema !== false && (rls?.approvals === void 0 || rls.approvals === false)) warnings.push("rls.jsonSchema constrains the approval store's body, which needs rls.approvals: true; nothing else is jsonb");
|
|
1604
|
+
if (jsonSchema !== void 0 && jsonSchema !== false && (rls?.approvals === void 0 || rls.approvals === false || typeof rls.approvals === "object" && rls.approvals.store === false)) warnings.push("rls.jsonSchema constrains the approval store's body, which needs rls.approvals: true; nothing else is jsonb");
|
|
1605
1605
|
const generated = generatePolicies(input, policy, options, built, warnings);
|
|
1606
1606
|
if (isRefusal(generated)) return generated;
|
|
1607
1607
|
const assembled = preambleSql(input, policy, options, built, generated, jsonSchema, warnings);
|
|
@@ -2496,7 +2496,7 @@ async function migrate(input) {
|
|
|
2496
2496
|
output: generated.output
|
|
2497
2497
|
};
|
|
2498
2498
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls migrate", input.cwd, PGSQL_PARSER_MAJOR);
|
|
2499
|
-
const { migrateTarget, runRlsMigrate } = await import("./migrate-
|
|
2499
|
+
const { migrateTarget, runRlsMigrate } = await import("./migrate-BbY5-Khy.js");
|
|
2500
2500
|
return runRlsMigrate({
|
|
2501
2501
|
cwd: input.cwd,
|
|
2502
2502
|
sql: input.sql,
|
|
@@ -2612,7 +2612,7 @@ async function runRls(input) {
|
|
|
2612
2612
|
}
|
|
2613
2613
|
case "import": {
|
|
2614
2614
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls import", input.cwd, PGSQL_PARSER_MAJOR);
|
|
2615
|
-
const { runRlsImport } = await import("./import-
|
|
2615
|
+
const { runRlsImport } = await import("./import-C1XXpG_m.js");
|
|
2616
2616
|
return runRlsImport({
|
|
2617
2617
|
cwd: input.cwd,
|
|
2618
2618
|
config: input.config,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as missingInput } from "./errors-
|
|
1
|
+
import { c as missingInput } from "./errors-BhRkoNS7.js";
|
|
2
2
|
import { t as defineLeaf } from "./command-L8EstFNm.js";
|
|
3
|
-
import { c as given, d as policyFlag, f as validatorFlag, i as dryRunFlag, l as outFlag, n as dbUrl, o as fileOut, r as dbUrlFlags, t as checkFlag } from "./flags-
|
|
3
|
+
import { c as given, d as policyFlag, f as validatorFlag, i as dryRunFlag, l as outFlag, n as dbUrl, o as fileOut, r as dbUrlFlags, t as checkFlag } from "./flags-BlmpmXoY.js";
|
|
4
4
|
//#region src/cli/commands/rls.ts
|
|
5
5
|
const membershipsFlag = { memberships: {
|
|
6
6
|
type: "string",
|
|
@@ -192,7 +192,7 @@ async function rlsInput(ctx, verb, shape, options) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
async function runRls(input) {
|
|
195
|
-
return (await import("./rls-
|
|
195
|
+
return (await import("./rls-DGBL-jDY.js")).runRls(input);
|
|
196
196
|
}
|
|
197
197
|
const generate = defineLeaf({
|
|
198
198
|
flags: {
|
|
@@ -215,7 +215,7 @@ const generate = defineLeaf({
|
|
|
215
215
|
valueHint: "parts",
|
|
216
216
|
list: true,
|
|
217
217
|
async complete() {
|
|
218
|
-
const { SPLIT_PARTS } = await import("./output-files-
|
|
218
|
+
const { SPLIT_PARTS } = await import("./output-files-BYscrQl-.js");
|
|
219
219
|
return SPLIT_PARTS;
|
|
220
220
|
}
|
|
221
221
|
},
|