permdock 0.17.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/{adoption-scan-Ci0xiJ3T.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-4KxMRdJC.js → approval-normalize-CUjgSsOl.js} +1 -1
- package/dist/{approval-policies-9VagPixq.d.ts → approval-policies-oNnckT12.d.ts} +1 -1
- package/dist/{approval-prompt-BSh-yxbH.d.ts → approval-prompt-Bg7gDSqd.d.ts} +1 -1
- package/dist/approvals/index.d.ts +3 -3
- package/dist/approvals/index.js +3 -3
- package/dist/{approvals-DdFcTncq.js → approvals-DGId_hgJ.js} +2 -2
- package/dist/{approvers-CNtl4Vc5.js → approvers-BaNwKYgd.js} +1 -3
- package/dist/{arazzo-_zUmT8ZT.js → arazzo--riLuGY0.js} +2 -2
- package/dist/{arazzo-7kbeh1yi.js → arazzo-CEDbb-uM.js} +1 -1
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +2 -2
- package/dist/{audience-jRO819i3.js → audience-B4YR9UpV.js} +1 -1
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +2 -2
- package/dist/{automation-DCWuVKtd.d.ts → automation-Bfa_wD1h.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-auth/index.js +1 -1
- package/dist/better-supabase/index.d.ts +153 -91
- package/dist/better-supabase/index.js +332 -62
- package/dist/{bind-BJFeLX1V.js → bind-B4pMH9bm.js} +4 -4
- package/dist/{bind-DjFNX0Pq.d.ts → bind-DR6ku3A9.d.ts} +7 -7
- package/dist/{build-instance-lye7oEqf.js → build-instance-BFMFQdE_.js} +1 -1
- package/dist/{capability-BzjWdKmP.d.ts → capability-BZ_veK9o.d.ts} +1 -1
- package/dist/{casbin-DFzk_so3.js → casbin-DCQHkkyj.js} +1 -1
- package/dist/{casbin-C3O_O9nu.js → casbin-bKC1FpEx.js} +1 -1
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +5 -5
- package/dist/catalog-Caqhbdix.js +1 -0
- package/dist/{catalog-DGDd_ww1.js → catalog-D1fw8qif.js} +2 -2
- package/dist/{catalog-operations-DVI5QO5R.js → catalog-operations-BD22drQf.js} +2 -2
- package/dist/{catalog-DJJIkR9P.js → catalog-zzNuR3sY.js} +1 -1
- package/dist/{challenge-M_ghKJnT.js → challenge-B2O2OLEk.js} +1 -1
- 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/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/index.d.ts +4 -4
- package/dist/cli/index.js +2 -2
- 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-DYqzmh5i.js → cloud-C0vXBmLG.js} +2 -2
- package/dist/{codemod-DqB9klYI.js → codemod-C-L0w-u7.js} +2 -2
- package/dist/{codemod-DNGMGqBS.js → codemod-eYI1FbeJ.js} +1 -1
- package/dist/{collect-C44RrKCI.js → collect-CU85z6Ta.js} +2 -2
- package/dist/{collect-HfJXl8Tr.js → collect-D878zLDP.js} +1 -1
- package/dist/collect-KCtOigxx.js +1 -0
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-BxiwRotu.d.ts → compile-DBm0ub4p.d.ts} +2 -2
- package/dist/{completion-pwVjJlek.js → completion-Dauc6pVT.js} +1 -1
- package/dist/{config-DnfH6_eT.js → config-DWp2PucY.js} +1 -1
- package/dist/{config-report-C1jl7Na-.js → config-report-DKpFm5ID.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +2 -2
- package/dist/{core-W5f4Rjt0.js → core-B8sLve3z.js} +3 -3
- package/dist/{core-0iYZ5HUx.d.ts → core-D87h2kpR.d.ts} +2 -2
- package/dist/{create-jCPwPWXf.js → create-3A7J9KRR.js} +4 -4
- package/dist/{create-DrHUmKvG.d.ts → create-BrQXL-Wt.d.ts} +6 -6
- package/dist/{create-bzQlBzG4.d.ts → create-BzwjZuRS.d.ts} +7 -7
- package/dist/{create-gqtDb1nU.js → create-C-tm3KIF.js} +3 -3
- package/dist/{create-DNN3OtsO.d.ts → create-CtoT1lIQ.d.ts} +4 -4
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-DyzWwxEB.d.ts → denied-text-DlIxt8fh.d.ts} +1 -1
- package/dist/{describe-nalX_HHE.d.ts → describe-BKtC_8PG.d.ts} +1 -1
- package/dist/{describe-CogP1loh.js → describe-BZAlPHxT.js} +1 -1
- package/dist/{diff-BTsLiW59.js → diff-BnNHqtHj.js} +4 -4
- package/dist/{diff-CcxYooMu.js → diff-CBCzOTWM.js} +1 -1
- package/dist/{doctor-DS-9ApID.js → doctor-CkYKCuX7.js} +55 -17
- package/dist/{doctor-BNRhJegR.js → doctor-xUpR5rXg.js} +2 -2
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-Dc9FdamT.d.ts → errors-TpzkEKgJ.d.ts} +1 -1
- package/dist/{evaluate-CsjXeLRo.js → evaluate-Czbj7thS.js} +2 -2
- package/dist/{evaluations-BasA9zXp.d.ts → evaluations-CisTTURl.d.ts} +3 -3
- package/dist/{evaluations-DG40eSJa.js → evaluations-h3KoJAPa.js} +1 -1
- 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-BgqpOOpd.d.ts → fetch-adapter-BdmfnbJM.d.ts} +2 -2
- package/dist/{fetch-adapter-UZOW0PRC.js → fetch-adapter-DH-NJPbL.js} +2 -2
- package/dist/{fixtures-0VTW5oNq.js → fixtures-Cemqurt8.js} +8 -2
- package/dist/{gen-CNCzG4sB.js → gen-BEIN-DRM.js} +1 -1
- package/dist/{gen-DnpZwQPo.js → gen-mf-MRwVr.js} +3 -3
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-DNnZffrI.js → helpers-DmqGy63f.js} +21 -13
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DxRLLiFU.d.ts → hosted-BFNXwcjd.d.ts} +1 -1
- package/dist/{hosted-tPZnyjQS.js → hosted-waouw2V-.js} +3 -3
- package/dist/{import-BYVbSKx0.js → import-DObwEota.js} +1 -1
- package/dist/{index-z44pfWar.d.ts → index-BhnOOnp9.d.ts} +2 -2
- package/dist/{index-DFwUOkvt.d.ts → index-CVGio3cH.d.ts} +4 -4
- package/dist/{index-CXXUFWtG.d.ts → index-CdMOd-GY.d.ts} +4 -4
- package/dist/{index-Bt-UoBWu.d.ts → index-CdUTE6qd.d.ts} +8 -8
- package/dist/{index-CZ5mixHO.d.ts → index-Dfv9Toct.d.ts} +1 -1
- package/dist/{index-DtGtDzjb.d.ts → index-rFp6X_QP.d.ts} +4 -4
- package/dist/index.d.ts +17 -17
- package/dist/index.js +15 -13
- package/dist/{init-YSDySeMy.js → init-CNJ8lLjo.js} +1 -1
- package/dist/{init-Dr1qAStu.js → init-DS3PEsCG.js} +3 -3
- package/dist/{instance-options-BOCRxEFb.d.ts → instance-options-2sFGSdsf.d.ts} +1 -1
- package/dist/{instance-snapshot-BgOGtyCy.js → instance-snapshot-BWa71my8.js} +2 -2
- package/dist/jwt/index.d.ts +4 -4
- package/dist/{kernel-CDDU93dI.js → kernel-30Z2zM_d.js} +6 -6
- package/dist/kysely/index.d.ts +3 -3
- package/dist/{login-CXgEKLaW.js → login-BgK5Jloo.js} +1 -1
- package/dist/{login-DEVXDTX8.js → login-DUVzBLh7.js} +3 -3
- 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-Dij1U0hx.js → manifest-wclLWBVH.js} +35 -35
- package/dist/{map-error-B_f3C5cs.js → map-error-BH16Ah8P.js} +1 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +5 -5
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +23 -10
- package/dist/next/index.js +29 -9
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +2 -2
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-D3wkvOoU.js → openapi-C4gFqeRz.js} +2 -2
- package/dist/{openapi-GM-kTdkq.js → openapi-zMEB9qxn.js} +2 -2
- 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/{output-DhTpe8v1.js → output-BFWLER4r.js} +1 -1
- package/dist/{ownership-moSRhxl_.js → ownership-D-mIt-w0.js} +1 -1
- package/dist/{parse-local-manifest-DEiCF4ah.js → parse-local-manifest-CxcSMQgl.js} +2 -2
- package/dist/{parse-local-manifest-BgTYdR3q.d.ts → parse-local-manifest-DvjTQNuO.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-DdzMv5-F.js → permdock-D-_WrdKu.js} +18 -8
- package/dist/{permdock-DUWZEOLR.d.ts → permdock-ffY4CMd9.d.ts} +20 -7
- package/dist/{permissions-CvpPtz5O.js → permissions-B3ggI88M.js} +2 -2
- package/dist/{permissions-CVXmRILq.js → permissions-BaoLxy66.js} +1 -13
- package/dist/{policy-CTNl7pvN.d.ts → policy-BtKSApSt.d.ts} +1 -1
- package/dist/{policy-DxQyHKPB.js → policy-cV_wwPb8.js} +2 -2
- package/dist/{policy-from-catalog-DVa1faOr.js → policy-from-catalog-B68hGC0S.js} +6 -6
- package/dist/{policy-types-IRJVABmm.d.ts → policy-types-D-GwfQTc.d.ts} +9 -0
- package/dist/{postgrest-B_cEDd4e.d.ts → postgrest-D84p5dbA.d.ts} +1 -1
- package/dist/{powersync-C0nsyULQ.js → powersync-9PYOE1wt.js} +150 -13
- package/dist/{powersync-BZxw_v-A.js → powersync-DStC_g0B.js} +2 -2
- package/dist/powersync-xNRlC4jN.js +1 -0
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{protected-action-qowj6nxN.js → protected-action-B40tU3yP.js} +2 -2
- package/dist/{protected-action-D3S9U4nc.d.ts → protected-action-Ds_EUY8B.d.ts} +5 -5
- package/dist/{protected-action-B6n6w7Rl.js → protected-action-OpOxtTsN.js} +1 -1
- package/dist/{provider-CjAu39fJ.d.ts → provider-OtnIiFWm.d.ts} +1 -1
- package/dist/{pull-DVoZ0V9_.js → pull-DLP4I1Kl.js} +2 -2
- package/dist/pull-UBjDnf4b.js +1 -0
- package/dist/{push-eJl1Tvqm.js → push-BSb8j1EW.js} +3 -3
- package/dist/{pushed-policy-DMXAOmEW.js → pushed-policy-BecMsTtM.js} +1 -1
- package/dist/{pushed-policy-CUQuvlS3.d.ts → pushed-policy-Ck3FZcoy.d.ts} +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +3 -3
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react-native/index.d.ts +103 -38
- package/dist/react-native/index.js +194 -35
- package/dist/{replay-Dc3d8LhG.d.ts → replay-E5X9E1lC.d.ts} +1 -1
- package/dist/{request-context-Ch052blg.js → request-context-DM6_jY1n.js} +1 -1
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-1nCei24V.js → resolve-names-CBl4r4_r.js} +1 -1
- package/dist/{rls-ClJRblnR.js → rls-DGBL-jDY.js} +10 -10
- package/dist/{rls-BVzoZCn3.js → rls-pAHGYgTb.js} +1 -1
- package/dist/{role-builder-BrmOcXch.js → role-builder-CMW4wWzn.js} +1 -1
- package/dist/{rpc-BOu3FD6X.js → rpc-KwX_Jcxz.js} +1 -1
- package/dist/{run-CnCaTjWX.js → run-B7lv3NuK.js} +2 -2
- package/dist/run-UPbacxPg.js +1 -0
- package/dist/{run-ticket-C6lXvHM_.d.ts → run-ticket-DPaD27_r.d.ts} +2 -2
- package/dist/{runtime-CBXkOcg9.js → runtime-rf0ZuyF3.js} +1 -1
- package/dist/{saas-BqM9mJkk.js → saas-B8H1MsQ3.js} +4 -4
- package/dist/{scan-CepUXrFt.js → scan-0r3OZqqK.js} +1 -1
- package/dist/{schema-9_NDz8fx.js → schema-B_9tXrbG.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +3 -3
- package/dist/{server-types-Bw-lWqzR.d.ts → server-types-3OnXjZ2D.d.ts} +8 -8
- package/dist/{sink-DUzt0e4B.d.ts → sink-ogbVkyeo.d.ts} +2 -2
- package/dist/{skills-BUuH-QFt.js → skills-B4MPRxQd.js} +1 -1
- package/dist/{skills-a4N6Y2Xm.js → skills-C9sTD70r.js} +1 -1
- package/dist/{snapshot-cache-Dbk-Gnij.d.ts → snapshot-cache-B4YvlGG_.d.ts} +1 -1
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid/index.js +3 -3
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-CXY05xtB.d.ts → sources-xdQShLDU.d.ts} +1 -1
- package/dist/{src-nYNBfmgq.js → src-Brzq_0in.js} +21 -104
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +1 -1
- package/dist/{standard-webhooks-BFeEpjxy.d.ts → standard-webhooks-BfPaZ6T1.d.ts} +2 -2
- package/dist/{store-g5ctUrOI.d.ts → store-DYeB-_U3.d.ts} +4 -4
- package/dist/{store-XgBMbfDy.js → store-DmVqy74I.js} +2 -2
- package/dist/{stores-53_kOwPi.js → stores-BYFopOm1.js} +2 -2
- package/dist/{stores-BtdN3eDO.d.ts → stores-EPul_8MN.d.ts} +5 -5
- package/dist/{stream-BMJg56jU.d.ts → stream-W2RuUYly.d.ts} +1 -1
- package/dist/supabase/client.d.ts +2 -31
- package/dist/supabase/index.d.ts +5 -5
- package/dist/supabase/index.js +3 -3
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +4 -4
- package/dist/{supabase-C8cNzp4i.js → supabase-BiViJpQ4.js} +1 -1
- package/dist/{supabase-C6FyUeSh.js → supabase-CogTyJH2.js} +2 -2
- package/dist/supabase-hook-BN46IrVI.js +1 -0
- package/dist/{supabase-hook-Cj85nccs.js → supabase-hook-DX38Hj8h.js} +238 -23
- package/dist/{supautils-BP_5WAIc.js → supautils-BGf6zRvM.js} +6 -6
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +5 -5
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +2 -2
- package/dist/svelte/source.d.ts +5 -5
- package/dist/svelte/source.js +3 -3
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-BsGE6HBR.js → tables-BfOk0ymL.js} +1 -1
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +2 -2
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +3 -3
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/index.d.ts +22 -22
- package/dist/testing/index.js +15 -15
- 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/{tool-refusal-C1UlhU0V.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-C_OnZW8c.d.ts → type-helpers-i1EJ3Eb1.d.ts} +1 -1
- package/dist/{types-CAAN7evk.d.ts → types-3Y8UpFkF.d.ts} +17 -1
- package/dist/{types-B3BOcI0J.d.ts → types-B8qUkGja.d.ts} +2 -2
- package/dist/{types-UfpcY575.d.ts → types-CCEeSCMB.d.ts} +3 -3
- package/dist/{types-AOP5HQku.d.ts → types-CDVXR6YD.d.ts} +1 -1
- package/dist/{types-CJC1aaoJ.d.ts → types-Ck1KOfug.d.ts} +2 -2
- package/dist/{types-BvBbkAu1.d.ts → types-CqcsNCaN.d.ts} +1 -1
- package/dist/{types-CA-A33Q5.d.ts → types-D-JO7lh8.d.ts} +4 -4
- package/dist/{types-DVZNTkU0.d.ts → types-D19MK4t-.d.ts} +3 -3
- package/dist/{types-Sj1U8HMm.d.ts → types-DGf_cpKF.d.ts} +2 -2
- package/dist/{types-e82uzrTn.d.ts → types-DmbfLu2p.d.ts} +4 -4
- package/dist/{types-D29K5ZNP.d.ts → types-o1vu6Ks3.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/usage-Cl5eb-e1.js +1 -0
- package/dist/{usage-COsGLht5.js → usage-DC0UKe6C.js} +3 -3
- package/dist/{usage-CqcMeQgX.js → usage-DYtRVkcN.js} +1 -1
- package/dist/{validation-error-DpvsBwZJ.d.ts → validation-error-Dx8PipbO.d.ts} +1 -1
- package/dist/{verify-C8G8D5mk.js → verify-Bpj0hauG.js} +8 -8
- package/dist/{version-cache-9Vq5QVFC.d.ts → version-cache-DzNKWiI6.d.ts} +1 -1
- package/dist/{views-TrZYlDnM.js → views-MWmJ6Y4P.js} +1 -1
- package/dist/vue/index.d.ts +5 -5
- package/dist/vue/index.js +3 -3
- package/dist/{waiter-C2cXXLFZ.d.ts → waiter-NK_UuZbb.d.ts} +2 -2
- package/dist/{watch-DXRDBSCu.js → watch-CBHADqBH.js} +1 -1
- package/dist/watch-OYwAPCzx.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/{who-can-BY5d3HPw.js → who-can-KhVWMxtf.js} +1 -1
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +2 -2
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-DpZAbxuD.d.ts → wrap-BHGA-SMM.d.ts} +2 -2
- package/package.json +1 -1
- package/schemas/supabase-manifest-v1.json +1 -1
- package/skills/permdock-approvals/references/stores-and-resume.md +1 -1
- package/skills/permdock-wire/references/adapters.md +3 -1
- package/dist/catalog-BpnjesqX.js +0 -1
- package/dist/collect-CAibhmCi.js +0 -1
- package/dist/powersync-Cqzx25dI.js +0 -1
- package/dist/pull-CUVdB04v.js +0 -1
- package/dist/run-D9N6V5WQ.js +0 -1
- package/dist/supabase-hook-CPBX4dy5.js +0 -1
- package/dist/usage-D1cpHO7p.js +0 -1
- package/dist/watch-DnymTAfe.js +0 -1
|
@@ -2,6 +2,7 @@ import { r as isRecord } from "./compact-CAf557ZB.js";
|
|
|
2
2
|
import { o as hasConditionOp } from "./refs-C8BKxc_e.js";
|
|
3
3
|
import { c as rootScope, d as scopeList, l as scopeChain, s as resolveScope } from "./scopes-BSdYaGHs.js";
|
|
4
4
|
import { t as APPROVAL_REQUEST_SCHEMA } from "./request-schema-CMP8Cmxd.js";
|
|
5
|
+
import { t as AUTHZ_EVENT } from "./authz-topic-Dbc-HDOS.js";
|
|
5
6
|
import { a as describeError, i as configError } from "./errors-BhRkoNS7.js";
|
|
6
7
|
import { i as readJsonFile, o as sqlFiles, s as writeFileEnsuringDir } from "./files-BSjrtIHw.js";
|
|
7
8
|
import { a as SUPABASE_MANIFEST_SCHEMA } from "./version-DMQ0dnN5.js";
|
|
@@ -9,8 +10,7 @@ import { c as requirePolicy } from "./load-BaEamml-.js";
|
|
|
9
10
|
import "./budget-BBCPDOGP.js";
|
|
10
11
|
import { i as qualifySqlTable } from "./sql-0WjxIp9g.js";
|
|
11
12
|
import { i as scopeColumn } from "./compile-B_oJqmIg.js";
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as authorizeSql } from "./supabase-C8cNzp4i.js";
|
|
13
|
+
import { t as authorizeSql } from "./supabase-BiViJpQ4.js";
|
|
14
14
|
import { a as hookApiNames, d as keptKeys, t as AUTHZ_VERSION_TABLE, u as roleManifest } from "./sources-C4vkzZJV.js";
|
|
15
15
|
import { o as readMemberships } from "./postgrest-BrjrckDG.js";
|
|
16
16
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
@@ -19,13 +19,13 @@ import { n as formatManifestJson, t as MANIFEST_FILE } from "./manifest-json-CAG
|
|
|
19
19
|
import { n as MIGRATION_DIRS } from "./constants-DcJABbLW.js";
|
|
20
20
|
import { f as writeOutputFiles, l as partPath, r as driftOf, u as pgDeltaPath } from "./output-files-CM0BnH05.js";
|
|
21
21
|
import { A as quoteQualified, D as qualified, F as firstScopeType, I as scopeTypeOf, O as quoteIdent, R as tenantTypeOf, a as customRolesOn, j as quoteTable, k as quoteLiteral, l as USER_ID_HELPER, r as HELPERS, y as subjectIdSql } from "./shared-DyYVEjKC.js";
|
|
22
|
-
import { E as TOKEN_SCOPE_ALLOWS, J as apiKeyFields, K as API_KEY_ALLOWS, R as globalRoleSource, _ as PERMISSION_HELPERS, at as memberForHelper, b as permissionKeysForHelper, bt as checkSuspension, ct as memberIdsHelper, dt as permittedForHelper, et as hasMemberFor, ft as permittedIdsHelper, g as OWNERSHIP, h as ASSIGNMENTS, lt as memberOfHelper, ot as memberForSources, rt as isTeamScope, st as memberForTable, tt as hasPermittedUsers, ut as memberRoleOf, v as checkName, vt as activeRowSql, x as permittedByPermissionHelper } from "./tables-
|
|
23
|
-
import { a as guardedTables, t as ownershipRules, u as roleNames } from "./ownership-
|
|
22
|
+
import { E as TOKEN_SCOPE_ALLOWS, J as apiKeyFields, K as API_KEY_ALLOWS, R as globalRoleSource, _ as PERMISSION_HELPERS, at as memberForHelper, b as permissionKeysForHelper, bt as checkSuspension, ct as memberIdsHelper, dt as permittedForHelper, et as hasMemberFor, ft as permittedIdsHelper, g as OWNERSHIP, h as ASSIGNMENTS, lt as memberOfHelper, ot as memberForSources, rt as isTeamScope, st as memberForTable, tt as hasPermittedUsers, ut as memberRoleOf, v as checkName, vt as activeRowSql, x as permittedByPermissionHelper } from "./tables-BfOk0ymL.js";
|
|
23
|
+
import { a as guardedTables, t as ownershipRules, u as roleNames } from "./ownership-D-mIt-w0.js";
|
|
24
24
|
import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
|
|
25
25
|
import { a as splitUndiffed, r as tableKey, t as decidingColumns } from "./deciding-columns-NB4wcyBf.js";
|
|
26
26
|
import { n as pgConnector } from "./pg-Ddxsd5ZB.js";
|
|
27
27
|
import { c as ACTOR_MAY_WRITE, f as readOnlyActorKinds } from "./fields-CrjL6A49.js";
|
|
28
|
-
import { r as permittedUsersHelper, t as resolveNames } from "./resolve-names-
|
|
28
|
+
import { r as permittedUsersHelper, t as resolveNames } from "./resolve-names-CBl4r4_r.js";
|
|
29
29
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
30
30
|
import { dirname, join, posix, resolve } from "node:path";
|
|
31
31
|
//#region ../../node_modules/.pnpm/smol-toml@1.9.1/node_modules/smol-toml/dist/error.js
|
|
@@ -1886,6 +1886,158 @@ function customRolesOfSql(parts) {
|
|
|
1886
1886
|
);`;
|
|
1887
1887
|
}
|
|
1888
1888
|
//#endregion
|
|
1889
|
+
//#region src/cli/rls/approval-managers.ts
|
|
1890
|
+
/** Whether the signed-in user manages a requester; better-supabase reads it. */
|
|
1891
|
+
const MANAGES = "permdock_manages";
|
|
1892
|
+
/**
|
|
1893
|
+
* The approver check with `manager` leaves; only `permdock_is_approver` calls
|
|
1894
|
+
* it.
|
|
1895
|
+
*/
|
|
1896
|
+
const APPROVES = "permdock_approves";
|
|
1897
|
+
const MANAGES_FOR = "permdock_manages_for";
|
|
1898
|
+
function named(value) {
|
|
1899
|
+
return typeof value === "string" && value !== "";
|
|
1900
|
+
}
|
|
1901
|
+
function checked(managers) {
|
|
1902
|
+
if (typeof managers !== "object" || managers === null || !("table" in managers && named(managers.table)) || !("user" in managers && named(managers.user)) || !("manager" in managers && named(managers.manager))) throw configError("PermDock CLI: rls.approvals.managers needs { table, user, manager }: the table that names each user's manager, its user column and its manager column");
|
|
1903
|
+
return {
|
|
1904
|
+
table: managers.table,
|
|
1905
|
+
user: managers.user,
|
|
1906
|
+
manager: managers.manager
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* `rls.approvals.managers`: `permdock_manages(p_requester, p_levels)` walks the
|
|
1911
|
+
* app's manager table up to `levels` steps (at most `MAX_MANAGER_LEVELS`) with
|
|
1912
|
+
* a cycle guard, and `permdock_approves` decides `manager` leaves with it and
|
|
1913
|
+
* every other leaf through the two-argument `permdock_is_approver`. The
|
|
1914
|
+
* requester never manages themselves into an approval. Without `delegations`,
|
|
1915
|
+
* the four-argument `permdock_is_approver` is written here; with them,
|
|
1916
|
+
* `approvalDelegationsSql` writes it and calls `permdock_approves` first.
|
|
1917
|
+
*/
|
|
1918
|
+
function approvalManagersSql(ctx, given, isApprover, delegations) {
|
|
1919
|
+
const managers = checked(given);
|
|
1920
|
+
const table = quoteQualified(managers.table);
|
|
1921
|
+
const user = quoteIdent(managers.user);
|
|
1922
|
+
const boss = quoteIdent(managers.manager);
|
|
1923
|
+
const manages = qualified(ctx, MANAGES);
|
|
1924
|
+
const managesFor = qualified(ctx, MANAGES_FOR);
|
|
1925
|
+
const approves = qualified(ctx, APPROVES);
|
|
1926
|
+
const me = `${subjectIdSql(ctx)}::text`;
|
|
1927
|
+
const entry = delegations ? "" : `
|
|
1928
|
+
-- approvers with managers: permdock_approves for the signed-in user
|
|
1929
|
+
create or replace function ${isApprover}(p_approvers jsonb, p_tenant text, p_requester text, p_resource text)
|
|
1930
|
+
returns boolean
|
|
1931
|
+
language sql
|
|
1932
|
+
stable
|
|
1933
|
+
security definer
|
|
1934
|
+
set search_path = ''
|
|
1935
|
+
as $$
|
|
1936
|
+
select ${approves}(p_approvers, p_tenant, p_requester)
|
|
1937
|
+
$$;
|
|
1938
|
+
revoke execute on function ${isApprover}(jsonb, text, text, text) from public, anon;
|
|
1939
|
+
grant execute on function ${isApprover}(jsonb, text, text, text) to authenticated;
|
|
1940
|
+
`;
|
|
1941
|
+
return `
|
|
1942
|
+
-- approval managers: whether p_user manages p_requester within p_levels steps of ${managers.table}
|
|
1943
|
+
create or replace function ${managesFor}(p_user text, p_requester text, p_levels integer)
|
|
1944
|
+
returns boolean
|
|
1945
|
+
language sql
|
|
1946
|
+
stable
|
|
1947
|
+
security definer
|
|
1948
|
+
set search_path = ''
|
|
1949
|
+
as $$
|
|
1950
|
+
with recursive chain (id, depth, path) as (
|
|
1951
|
+
select m.${boss}::text, 1, array[p_requester, m.${boss}::text]
|
|
1952
|
+
from ${table} m
|
|
1953
|
+
where m.${user}::text = p_requester
|
|
1954
|
+
and m.${boss} is not null
|
|
1955
|
+
union all
|
|
1956
|
+
select m.${boss}::text, c.depth + 1, c.path || m.${boss}::text
|
|
1957
|
+
from chain c
|
|
1958
|
+
join ${table} m on m.${user}::text = c.id
|
|
1959
|
+
where c.depth < least(p_levels, ${String(8)})
|
|
1960
|
+
and m.${boss} is not null
|
|
1961
|
+
and not (m.${boss}::text = any (c.path))
|
|
1962
|
+
)
|
|
1963
|
+
select coalesce(
|
|
1964
|
+
p_requester <> ''
|
|
1965
|
+
and p_user <> ''
|
|
1966
|
+
and p_levels between 1 and ${String(8)}
|
|
1967
|
+
and p_user <> p_requester
|
|
1968
|
+
and exists (select 1 from chain c where c.id = p_user),
|
|
1969
|
+
false
|
|
1970
|
+
)
|
|
1971
|
+
$$;
|
|
1972
|
+
revoke execute on function ${managesFor}(text, text, integer) from public, anon, authenticated;
|
|
1973
|
+
|
|
1974
|
+
-- approval managers: whether the signed-in user manages p_requester within p_levels steps of ${managers.table}
|
|
1975
|
+
create or replace function ${manages}(p_requester text, p_levels integer)
|
|
1976
|
+
returns boolean
|
|
1977
|
+
language sql
|
|
1978
|
+
stable
|
|
1979
|
+
security definer
|
|
1980
|
+
set search_path = ''
|
|
1981
|
+
as $$
|
|
1982
|
+
select ${managesFor}(${me}, p_requester, p_levels)
|
|
1983
|
+
$$;
|
|
1984
|
+
revoke execute on function ${manages}(text, integer) from public, anon, authenticated;
|
|
1985
|
+
|
|
1986
|
+
-- approval managers: approvers.by with manager leaves; only permdock_is_approver calls it
|
|
1987
|
+
create or replace function ${approves}(p_approvers jsonb, p_tenant text, p_requester text)
|
|
1988
|
+
returns boolean
|
|
1989
|
+
language plpgsql
|
|
1990
|
+
stable
|
|
1991
|
+
security definer
|
|
1992
|
+
set search_path = ''
|
|
1993
|
+
as $$
|
|
1994
|
+
declare
|
|
1995
|
+
v_item jsonb;
|
|
1996
|
+
v_levels jsonb;
|
|
1997
|
+
begin
|
|
1998
|
+
if p_approvers is null then
|
|
1999
|
+
return false;
|
|
2000
|
+
end if;
|
|
2001
|
+
if jsonb_typeof(p_approvers) = 'array' then
|
|
2002
|
+
if jsonb_array_length(p_approvers) = 0 then
|
|
2003
|
+
return false;
|
|
2004
|
+
end if;
|
|
2005
|
+
for v_item in select value from jsonb_array_elements(p_approvers) loop
|
|
2006
|
+
if not ${approves}(v_item, p_tenant, p_requester) then
|
|
2007
|
+
return false;
|
|
2008
|
+
end if;
|
|
2009
|
+
end loop;
|
|
2010
|
+
return true;
|
|
2011
|
+
end if;
|
|
2012
|
+
if jsonb_typeof(p_approvers) <> 'object' then
|
|
2013
|
+
return false;
|
|
2014
|
+
end if;
|
|
2015
|
+
case p_approvers ->> 'kind'
|
|
2016
|
+
when 'manager' then
|
|
2017
|
+
v_levels := coalesce(p_approvers -> 'levels', '1'::jsonb);
|
|
2018
|
+
if jsonb_typeof(v_levels) <> 'number' or v_levels::text !~ '^[0-9]{1,2}$' then
|
|
2019
|
+
return false;
|
|
2020
|
+
end if;
|
|
2021
|
+
return coalesce(${manages}(p_requester, v_levels::text::integer), false);
|
|
2022
|
+
when 'any-of' then
|
|
2023
|
+
if jsonb_typeof(p_approvers -> 'of') <> 'array' then
|
|
2024
|
+
return false;
|
|
2025
|
+
end if;
|
|
2026
|
+
for v_item in select value from jsonb_array_elements(p_approvers -> 'of') loop
|
|
2027
|
+
if ${approves}(v_item, p_tenant, p_requester) then
|
|
2028
|
+
return true;
|
|
2029
|
+
end if;
|
|
2030
|
+
end loop;
|
|
2031
|
+
return false;
|
|
2032
|
+
else
|
|
2033
|
+
return ${isApprover}(p_approvers, p_tenant);
|
|
2034
|
+
end case;
|
|
2035
|
+
end;
|
|
2036
|
+
$$;
|
|
2037
|
+
revoke execute on function ${approves}(jsonb, text, text) from public, anon, authenticated;
|
|
2038
|
+
${entry}`;
|
|
2039
|
+
}
|
|
2040
|
+
//#endregion
|
|
1889
2041
|
//#region src/cli/rls/approval-policies.ts
|
|
1890
2042
|
/**
|
|
1891
2043
|
* The objects `rls.approvals.tenantPolicies` adds; `tableApprovalPolicySource`
|
|
@@ -2277,17 +2429,30 @@ grant execute on function ${fn}(jsonb, text) to authenticated;
|
|
|
2277
2429
|
}
|
|
2278
2430
|
/**
|
|
2279
2431
|
* Everything `rls.approvals` writes: the generated or adopted store, the
|
|
2280
|
-
* approver check, with `
|
|
2281
|
-
* `tenantPolicies` the tenant approval policies. With
|
|
2282
|
-
* covers' write policies call
|
|
2432
|
+
* approver check, with `managers` the manager walk, with `delegations: true`
|
|
2433
|
+
* the covers, and with `tenantPolicies` the tenant approval policies. With
|
|
2434
|
+
* `actorMayWrite`, the covers' write policies call
|
|
2435
|
+
* `permdock_actor_may_write()`.
|
|
2283
2436
|
*/
|
|
2284
2437
|
function approvalsSql(ctx, approvals, jsonSchema, actorMayWrite = false) {
|
|
2285
2438
|
if (approvals === void 0 || approvals === false) return;
|
|
2286
2439
|
if (approvals === true) return approvalStoreSql(ctx, jsonSchema) + isApproverSql(ctx);
|
|
2287
|
-
const { table, delegations, tenantPolicies } = approvals;
|
|
2440
|
+
const { table, delegations, tenantPolicies, managers } = approvals;
|
|
2288
2441
|
if (delegations !== void 0 && typeof delegations !== "boolean") throw new TypeError("PermDock CLI: rls.approvals.delegations must be a boolean");
|
|
2442
|
+
if (approvals.store !== void 0 && typeof approvals.store !== "boolean") throw new TypeError("PermDock CLI: rls.approvals.store must be a boolean");
|
|
2289
2443
|
let store;
|
|
2290
|
-
if (
|
|
2444
|
+
if (approvals.store === false) {
|
|
2445
|
+
const adopted = [
|
|
2446
|
+
"table",
|
|
2447
|
+
"token",
|
|
2448
|
+
"body",
|
|
2449
|
+
"open",
|
|
2450
|
+
"schema",
|
|
2451
|
+
"mirror"
|
|
2452
|
+
].find((key) => approvals[key] !== void 0);
|
|
2453
|
+
if (adopted !== void 0) throw configError(`PermDock CLI: rls.approvals.${adopted} configures the approval store, which rls.approvals.store: false leaves out`);
|
|
2454
|
+
store = "";
|
|
2455
|
+
} else if (table === void 0) {
|
|
2291
2456
|
const adoptOnly = [
|
|
2292
2457
|
"token",
|
|
2293
2458
|
"body",
|
|
@@ -2301,7 +2466,7 @@ function approvalsSql(ctx, approvals, jsonSchema, actorMayWrite = false) {
|
|
|
2301
2466
|
...approvals,
|
|
2302
2467
|
table
|
|
2303
2468
|
}, jsonSchema);
|
|
2304
|
-
return store + isApproverSql(ctx) + (delegations === true ? approvalDelegationsSql(ctx, actorMayWrite) : "") + (tenantPolicies === void 0 ? "" : approvalPoliciesSql(ctx, tenantPolicies, actorMayWrite));
|
|
2469
|
+
return store + isApproverSql(ctx) + (managers === void 0 ? "" : approvalManagersSql(ctx, managers, qualified(ctx, APPROVAL_STORE.isApprover), delegations === true)) + (delegations === true ? approvalDelegationsSql(ctx, actorMayWrite, managers !== void 0) : "") + (delegations === true || managers !== void 0 ? requestApproversSql(ctx) : "") + (tenantPolicies === void 0 ? "" : approvalPoliciesSql(ctx, tenantPolicies, actorMayWrite));
|
|
2305
2470
|
}
|
|
2306
2471
|
/**
|
|
2307
2472
|
* The objects `rls.approvals.delegations` adds; `tableApprovalDelegationSource`
|
|
@@ -2314,13 +2479,15 @@ const DELEGATIONS = {
|
|
|
2314
2479
|
/**
|
|
2315
2480
|
* `rls.approvals.delegations`: one table of out-of-office covers that a user
|
|
2316
2481
|
* writes for themselves, and a four-argument `permdock_is_approver` that also
|
|
2317
|
-
* answers for a delegate inside an active cover.
|
|
2482
|
+
* answers for a delegate inside an active cover. With `managers`, the signed-in
|
|
2483
|
+
* user's own check is `permdock_approves`, and a cover passes on a `manager`
|
|
2484
|
+
* leaf when the delegator manages the requester. One hop: a cover is checked
|
|
2318
2485
|
* against the delegator's own approver rights, never the delegator's covers. A
|
|
2319
2486
|
* delegator who is the requester never counts. A `holder()` approver through a
|
|
2320
2487
|
* cover needs `rls.mode: "database"`, where the `_for` helpers exist; in `jwt`
|
|
2321
2488
|
* mode only `user()` approvers pass.
|
|
2322
2489
|
*/
|
|
2323
|
-
function approvalDelegationsSql(ctx, actorMayWrite = false) {
|
|
2490
|
+
function approvalDelegationsSql(ctx, actorMayWrite = false, managers = false) {
|
|
2324
2491
|
const table = qualified(ctx, DELEGATIONS.table);
|
|
2325
2492
|
const fn = qualified(ctx, APPROVAL_STORE.isApprover);
|
|
2326
2493
|
const covers = qualified(ctx, DELEGATIONS.covers);
|
|
@@ -2337,7 +2504,15 @@ function approvalDelegationsSql(ctx, actorMayWrite = false) {
|
|
|
2337
2504
|
where i.id::text = p_tenant
|
|
2338
2505
|
)` : "false";
|
|
2339
2506
|
const policy = (name) => quoteIdent(`${DELEGATIONS.table}_${name}`);
|
|
2340
|
-
const
|
|
2507
|
+
const writable = actorMayWrite ? ` and (select ${qualified(ctx, ACTOR_MAY_WRITE)}())` : "";
|
|
2508
|
+
const managerCase = managers ? `
|
|
2509
|
+
when 'manager' then
|
|
2510
|
+
v_levels := coalesce(p_approvers -> 'levels', '1'::jsonb);
|
|
2511
|
+
if jsonb_typeof(v_levels) <> 'number' or v_levels::text !~ '^[0-9]{1,2}$' then
|
|
2512
|
+
return false;
|
|
2513
|
+
end if;
|
|
2514
|
+
return coalesce(${qualified(ctx, MANAGES_FOR)}(p_delegator::text, p_requester, v_levels::text::integer), false);` : "";
|
|
2515
|
+
const mine = `delegator::text = ${me}${writable}`;
|
|
2341
2516
|
const own = `${mine} and (tenant is null or ${member("tenant")})`;
|
|
2342
2517
|
return `
|
|
2343
2518
|
-- approval delegations: out-of-office covers a user writes for themselves; tableApprovalDelegationSource and permdock_is_approver read them
|
|
@@ -2377,7 +2552,7 @@ create policy ${policy("delete")} on ${table}
|
|
|
2377
2552
|
using (${mine});
|
|
2378
2553
|
|
|
2379
2554
|
-- approval delegations: whether a delegator's own rights match approvers.by; only permdock_is_approver calls it
|
|
2380
|
-
create or replace function ${covers}(p_delegator ${user}, p_approvers jsonb, p_tenant text)
|
|
2555
|
+
create or replace function ${covers}(p_delegator ${user}, p_approvers jsonb, p_tenant text, p_requester text)
|
|
2381
2556
|
returns boolean
|
|
2382
2557
|
language plpgsql
|
|
2383
2558
|
stable
|
|
@@ -2385,7 +2560,7 @@ security definer
|
|
|
2385
2560
|
set search_path = ''
|
|
2386
2561
|
as $$
|
|
2387
2562
|
declare
|
|
2388
|
-
v_item jsonb;
|
|
2563
|
+
v_item jsonb;${managers ? "\n v_levels jsonb;" : ""}
|
|
2389
2564
|
begin
|
|
2390
2565
|
if p_delegator is null or p_approvers is null then
|
|
2391
2566
|
return false;
|
|
@@ -2395,7 +2570,7 @@ begin
|
|
|
2395
2570
|
return false;
|
|
2396
2571
|
end if;
|
|
2397
2572
|
for v_item in select value from jsonb_array_elements(p_approvers) loop
|
|
2398
|
-
if not ${covers}(p_delegator, v_item, p_tenant) then
|
|
2573
|
+
if not ${covers}(p_delegator, v_item, p_tenant, p_requester) then
|
|
2399
2574
|
return false;
|
|
2400
2575
|
end if;
|
|
2401
2576
|
end loop;
|
|
@@ -2411,13 +2586,13 @@ begin
|
|
|
2411
2586
|
if p_tenant is null then
|
|
2412
2587
|
return ${holderGlobal};
|
|
2413
2588
|
end if;
|
|
2414
|
-
return ${holderTenant}
|
|
2589
|
+
return ${holderTenant};${managerCase}
|
|
2415
2590
|
when 'any-of' then
|
|
2416
2591
|
if jsonb_typeof(p_approvers -> 'of') <> 'array' then
|
|
2417
2592
|
return false;
|
|
2418
2593
|
end if;
|
|
2419
2594
|
for v_item in select value from jsonb_array_elements(p_approvers -> 'of') loop
|
|
2420
|
-
if ${covers}(p_delegator, v_item, p_tenant) then
|
|
2595
|
+
if ${covers}(p_delegator, v_item, p_tenant, p_requester) then
|
|
2421
2596
|
return true;
|
|
2422
2597
|
end if;
|
|
2423
2598
|
end loop;
|
|
@@ -2427,7 +2602,7 @@ begin
|
|
|
2427
2602
|
end case;
|
|
2428
2603
|
end;
|
|
2429
2604
|
$$;
|
|
2430
|
-
revoke execute on function ${covers}(${user}, jsonb, text) from public, anon, authenticated;
|
|
2605
|
+
revoke execute on function ${covers}(${user}, jsonb, text, text) from public, anon, authenticated;
|
|
2431
2606
|
|
|
2432
2607
|
-- approvers with covers: the signed-in user, or a delegate inside an active cover of a delegator who is not the requester
|
|
2433
2608
|
create or replace function ${fn}(p_approvers jsonb, p_tenant text, p_requester text, p_resource text)
|
|
@@ -2441,7 +2616,7 @@ declare
|
|
|
2441
2616
|
v_delegator ${user};
|
|
2442
2617
|
v_user text := ${me};
|
|
2443
2618
|
begin
|
|
2444
|
-
if ${fn}(p_approvers, p_tenant) then
|
|
2619
|
+
if ${managers ? `${qualified(ctx, APPROVES)}(p_approvers, p_tenant, p_requester)` : `${fn}(p_approvers, p_tenant)`} then
|
|
2445
2620
|
return true;
|
|
2446
2621
|
end if;
|
|
2447
2622
|
if coalesce(v_user, '') = '' or coalesce(p_requester, '') = '' then
|
|
@@ -2462,7 +2637,7 @@ begin
|
|
|
2462
2637
|
and d.permissions is null
|
|
2463
2638
|
and (d.resources is null or p_resource = any (d.resources))
|
|
2464
2639
|
loop
|
|
2465
|
-
if ${covers}(v_delegator, p_approvers, p_tenant) then
|
|
2640
|
+
if ${covers}(v_delegator, p_approvers, p_tenant, p_requester) then
|
|
2466
2641
|
return true;
|
|
2467
2642
|
end if;
|
|
2468
2643
|
end loop;
|
|
@@ -2473,6 +2648,45 @@ revoke execute on function ${fn}(jsonb, text, text, text) from public, anon;
|
|
|
2473
2648
|
grant execute on function ${fn}(jsonb, text, text, text) to authenticated;
|
|
2474
2649
|
`;
|
|
2475
2650
|
}
|
|
2651
|
+
function requestApproversSql(ctx) {
|
|
2652
|
+
const fn = qualified(ctx, APPROVAL_STORE.isApprover);
|
|
2653
|
+
return `
|
|
2654
|
+
-- approvers with the current step: the four-argument check over p_approvers and the step's users, manager and permission
|
|
2655
|
+
create or replace function ${fn}(p_approvers jsonb, p_tenant text, p_requester text, p_resource text, p_request_approvers jsonb)
|
|
2656
|
+
returns boolean
|
|
2657
|
+
language sql
|
|
2658
|
+
stable
|
|
2659
|
+
security definer
|
|
2660
|
+
set search_path = ''
|
|
2661
|
+
as $$
|
|
2662
|
+
select ${fn}(
|
|
2663
|
+
jsonb_build_object(
|
|
2664
|
+
'kind', 'any-of',
|
|
2665
|
+
'of',
|
|
2666
|
+
case when p_approvers is null then '[]'::jsonb else jsonb_build_array(p_approvers) end
|
|
2667
|
+
|| case
|
|
2668
|
+
when jsonb_typeof(p_request_approvers -> 'users') = 'array' then coalesce(
|
|
2669
|
+
(select jsonb_agg(jsonb_build_object('kind', 'user', 'id', u.id)) from jsonb_array_elements_text(p_request_approvers -> 'users') u(id)),
|
|
2670
|
+
'[]'::jsonb
|
|
2671
|
+
)
|
|
2672
|
+
else '[]'::jsonb
|
|
2673
|
+
end
|
|
2674
|
+
|| case when p_request_approvers -> 'manager' = 'true'::jsonb then '[{"kind": "manager"}]'::jsonb else '[]'::jsonb end
|
|
2675
|
+
|| case
|
|
2676
|
+
when jsonb_typeof(p_request_approvers -> 'permission') = 'string'
|
|
2677
|
+
then jsonb_build_array(jsonb_build_object('kind', 'permission', 'permission', p_request_approvers ->> 'permission'))
|
|
2678
|
+
else '[]'::jsonb
|
|
2679
|
+
end
|
|
2680
|
+
),
|
|
2681
|
+
p_tenant,
|
|
2682
|
+
p_requester,
|
|
2683
|
+
p_resource
|
|
2684
|
+
)
|
|
2685
|
+
$$;
|
|
2686
|
+
revoke execute on function ${fn}(jsonb, text, text, text, jsonb) from public, anon;
|
|
2687
|
+
grant execute on function ${fn}(jsonb, text, text, text, jsonb) to authenticated;
|
|
2688
|
+
`;
|
|
2689
|
+
}
|
|
2476
2690
|
/**
|
|
2477
2691
|
* The request fields an adopted table may mirror into its own columns, as SQL
|
|
2478
2692
|
* over a body.
|
|
@@ -3386,7 +3600,8 @@ function trustedHelpers(parts, config, types, tenantType, policy) {
|
|
|
3386
3600
|
...config.rls?.apiKeys === void 0 ? [] : [helperEntry(API_KEY_ALLOWS, "p_grant text", "boolean", client)],
|
|
3387
3601
|
...config.rls?.tokenScopes === true ? [helperEntry(TOKEN_SCOPE_ALLOWS, "p_grant text", "boolean", client)] : [],
|
|
3388
3602
|
...readOnlyActorKinds(config.rls?.readOnlyActors) === void 0 ? [] : [helperEntry(ACTOR_MAY_WRITE, "", "boolean", client)],
|
|
3389
|
-
...config.rls?.approvals === true || typeof config.rls?.approvals === "object" ? [helperEntry(IS_APPROVER, typeof config.rls.approvals === "object" && config.rls.approvals.delegations === true ? "p_approvers jsonb, p_tenant text, p_requester text, p_resource text" : "p_approvers jsonb, p_tenant text", "boolean", client)] : [],
|
|
3603
|
+
...config.rls?.approvals === true || typeof config.rls?.approvals === "object" ? [helperEntry(IS_APPROVER, typeof config.rls.approvals === "object" && (config.rls.approvals.delegations === true || config.rls.approvals.managers !== void 0) ? "p_approvers jsonb, p_tenant text, p_requester text, p_resource text" : "p_approvers jsonb, p_tenant text", "boolean", client)] : [],
|
|
3604
|
+
...typeof config.rls?.approvals === "object" && config.rls.approvals.managers !== void 0 ? [helperEntry(MANAGES, "p_requester text, p_levels integer", "boolean", [])] : [],
|
|
3390
3605
|
...forUser
|
|
3391
3606
|
];
|
|
3392
3607
|
if (!(policy !== void 0 && (ownershipRules(policy, parts.scopes)?.assigns.length ?? 0) > 0)) return keyed;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { c as listPermissions, u as renamedKeys } from "./permission-registry-B8tYxPIt.js";
|
|
2
2
|
import { d as scopeList, s as resolveScope } from "./scopes-BSdYaGHs.js";
|
|
3
3
|
import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
|
|
4
|
-
import { l as policyLevels } from "./policy-
|
|
4
|
+
import { l as policyLevels } from "./policy-cV_wwPb8.js";
|
|
5
5
|
import { a as describeError, i as configError } from "./errors-BhRkoNS7.js";
|
|
6
6
|
import "./budget-BBCPDOGP.js";
|
|
7
7
|
import { d as sqlTextArray, i as qualifySqlTable } from "./sql-0WjxIp9g.js";
|
|
8
8
|
import { l as roleColumn } from "./sources-C4vkzZJV.js";
|
|
9
9
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
10
10
|
import { c as parseSplit } from "./output-files-CM0BnH05.js";
|
|
11
|
-
import { x as resolveAuthorize } from "./supabase-hook-
|
|
11
|
+
import { x as resolveAuthorize } from "./supabase-hook-DX38Hj8h.js";
|
|
12
12
|
import { A as quoteQualified, C as parseMembershipsFlag, D as qualified, F as firstScopeType, O as quoteIdent, R as tenantTypeOf, a as customRolesOn, j as quoteTable, k as quoteLiteral, s as signedIn, t as CUSTOM_ROLES } from "./shared-DyYVEjKC.js";
|
|
13
|
-
import { G as byKey, H as rolesTableScope, O as tokenScopesPlan, Q as graphSqlName, V as raiseSql, W as byCodeUnit, Y as apiKeysPlan, a as closureDepths, bt as checkSuspension, i as tablelessResources, o as graphPlan, r as tableNames, t as resolveVias, z as currentKeyExpr } from "./tables-
|
|
14
|
-
import { o as assignableRoles, r as unsatisfiedKinds, t as ownershipRules, u as roleNames } from "./ownership-
|
|
13
|
+
import { G as byKey, H as rolesTableScope, O as tokenScopesPlan, Q as graphSqlName, V as raiseSql, W as byCodeUnit, Y as apiKeysPlan, a as closureDepths, bt as checkSuspension, i as tablelessResources, o as graphPlan, r as tableNames, t as resolveVias, z as currentKeyExpr } from "./tables-BfOk0ymL.js";
|
|
14
|
+
import { o as assignableRoles, r as unsatisfiedKinds, t as ownershipRules, u as roleNames } from "./ownership-D-mIt-w0.js";
|
|
15
15
|
import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
|
|
16
16
|
import { i as group, o as sqlStatements } from "./deciding-columns-NB4wcyBf.js";
|
|
17
17
|
import { d as orSql, h as branchClauses } from "./fields-CrjL6A49.js";
|
|
18
|
-
import { t as resolveNames } from "./resolve-names-
|
|
19
|
-
import { m as tableFor } from "./verify-
|
|
18
|
+
import { t as resolveNames } from "./resolve-names-CBl4r4_r.js";
|
|
19
|
+
import { m as tableFor } from "./verify-Bpj0hauG.js";
|
|
20
20
|
//#region src/cli/rls/custom-role-rebuild.ts
|
|
21
21
|
const PREFIX = "PermDock CLI";
|
|
22
22
|
/** A column of the roles-table row `r`. */
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as requiredPlans } from "../errors-
|
|
2
|
-
import { i as describe } from "../describe-
|
|
1
|
+
import { c as requiredPlans } from "../errors-TpzkEKgJ.js";
|
|
2
|
+
import { i as describe } from "../describe-BKtC_8PG.js";
|
|
3
3
|
import { t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
4
|
-
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-
|
|
4
|
+
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-DYeB-_U3.js";
|
|
5
5
|
import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-L9UOwATg.js";
|
|
6
6
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
7
|
-
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-
|
|
8
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
7
|
+
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-D19MK4t-.js";
|
|
8
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-EPul_8MN.js";
|
|
9
9
|
import { Component } from "svelte";
|
|
10
10
|
//#region src/svelte/index.d.ts
|
|
11
11
|
export declare const Protected: Component<ProtectedProps>;
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as requiredPlans } from "../problem-details-CLDgX1KV.js";
|
|
2
|
-
import { n as describe } from "../describe-
|
|
2
|
+
import { n as describe } from "../describe-BZAlPHxT.js";
|
|
3
3
|
import { n as boundaryFallback, t as boundaryDigest } from "../boundary-BV3O1eud.js";
|
|
4
|
-
import { r as approvalHeaders } from "../protected-action-
|
|
5
|
-
import { u as slotContent } from "../views-
|
|
4
|
+
import { r as approvalHeaders } from "../protected-action-OpOxtTsN.js";
|
|
5
|
+
import { u as slotContent } from "../views-MWmJ6Y4P.js";
|
|
6
6
|
import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options--zWn48PK.js";
|
|
7
7
|
import { n as getUi, t as getStore } from "../context-DeammvFl.js";
|
|
8
|
-
import { n as viewFor, t as scopedFor } from "../runtime-
|
|
9
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
8
|
+
import { n as viewFor, t as scopedFor } from "../runtime-rf0ZuyF3.js";
|
|
9
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-BYFopOm1.js";
|
|
10
10
|
import "svelte/internal/disclose-version";
|
|
11
11
|
import * as $ from "svelte/internal/client";
|
|
12
12
|
import { onDestroy } from "svelte";
|
package/dist/svelte/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as DescribeMessages } from "../describe-
|
|
1
|
+
import { n as DescribeMessages } from "../describe-BKtC_8PG.js";
|
|
2
2
|
import { n as boundaryDigest, r as boundaryFallback, t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
3
|
-
import { t as ClientStore } from "../store-
|
|
4
|
-
import { a as scopedFor, c as slotContent, i as ProtectedProps, o as viewFor, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-
|
|
3
|
+
import { t as ClientStore } from "../store-DYeB-_U3.js";
|
|
4
|
+
import { a as scopedFor, c as slotContent, i as ProtectedProps, o as viewFor, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-D19MK4t-.js";
|
|
5
5
|
//#region src/svelte/context.d.ts
|
|
6
6
|
/** The provider's `defaults` and `messages`. */
|
|
7
7
|
type PermDockUi = {
|
package/dist/svelte/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as boundaryFallback, t as boundaryDigest } from "../boundary-BV3O1eud.js";
|
|
2
|
-
import { u as slotContent } from "../views-
|
|
2
|
+
import { u as slotContent } from "../views-MWmJ6Y4P.js";
|
|
3
3
|
import { n as getUi, t as getStore } from "../context-DeammvFl.js";
|
|
4
|
-
import { n as viewFor, t as scopedFor } from "../runtime-
|
|
4
|
+
import { n as viewFor, t as scopedFor } from "../runtime-rf0ZuyF3.js";
|
|
5
5
|
export { boundaryDigest, boundaryFallback, getStore, getUi, scopedFor, slotContent, viewFor };
|
package/dist/svelte/source.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as requiredPlans } from "../errors-
|
|
2
|
-
import { i as describe } from "../describe-
|
|
1
|
+
import { c as requiredPlans } from "../errors-TpzkEKgJ.js";
|
|
2
|
+
import { i as describe } from "../describe-BKtC_8PG.js";
|
|
3
3
|
import { t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
4
|
-
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-
|
|
4
|
+
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-DYeB-_U3.js";
|
|
5
5
|
import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-L9UOwATg.js";
|
|
6
6
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
7
|
-
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-
|
|
8
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
7
|
+
import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-D19MK4t-.js";
|
|
8
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-EPul_8MN.js";
|
|
9
9
|
import { Component } from "svelte";
|
|
10
10
|
//#region src/svelte/source.d.ts
|
|
11
11
|
export declare const Protected: Component<ProtectedProps>;
|
package/dist/svelte/source.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as requiredPlans } from "../problem-details-CLDgX1KV.js";
|
|
2
|
-
import { n as describe } from "../describe-
|
|
3
|
-
import { r as approvalHeaders } from "../protected-action-
|
|
2
|
+
import { n as describe } from "../describe-BZAlPHxT.js";
|
|
3
|
+
import { r as approvalHeaders } from "../protected-action-OpOxtTsN.js";
|
|
4
4
|
import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options--zWn48PK.js";
|
|
5
|
-
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-
|
|
5
|
+
import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-BYFopOm1.js";
|
|
6
6
|
import PermissionBoundaryComponent from "./PermissionBoundary.svelte";
|
|
7
7
|
import ProtectedComponent from "./Protected.svelte";
|
|
8
8
|
//#region src/svelte/source.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $t as Snapshot, E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-
|
|
1
|
+
import { $t as Snapshot, E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-D-GwfQTc.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
3
|
import { a as OperationInput, t as Operation } from "../operations-Ci_rT6Uo.js";
|
|
4
|
-
import { a as PermDock } from "../permdock-
|
|
5
|
-
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-
|
|
6
|
-
import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-
|
|
4
|
+
import { a as PermDock } from "../permdock-ffY4CMd9.js";
|
|
5
|
+
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-3OnXjZ2D.js";
|
|
6
|
+
import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-BdmfnbJM.js";
|
|
7
7
|
import { RequestEvent } from "@sveltejs/kit";
|
|
8
8
|
//#region src/sveltekit/create.d.ts
|
|
9
9
|
/**
|
package/dist/sveltekit/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-
|
|
2
|
-
import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-
|
|
1
|
+
import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-h3KoJAPa.js";
|
|
2
|
+
import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-DH-NJPbL.js";
|
|
3
3
|
//#region src/sveltekit/create.ts
|
|
4
4
|
const route = {
|
|
5
5
|
context: (event) => event,
|
|
@@ -4,7 +4,7 @@ import { c as rootScope, d as scopeList, l as scopeChain, s as resolveScope } fr
|
|
|
4
4
|
import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
|
|
5
5
|
import { r as relationCondition, t as inheritCondition } from "./grantee-conditions-DX4K_gGI.js";
|
|
6
6
|
import { l as partitionsOf, p as scopeField } from "./tenancy-DvOHHk3-.js";
|
|
7
|
-
import { a as delegatedScopeMap } from "./permdock-
|
|
7
|
+
import { a as delegatedScopeMap } from "./permdock-D-_WrdKu.js";
|
|
8
8
|
import { i as configError } from "./errors-BhRkoNS7.js";
|
|
9
9
|
import { d as sqlTextArray, i as qualifySqlTable, t as SQL_IDENT } from "./sql-0WjxIp9g.js";
|
|
10
10
|
import { a as scopeMembershipTable, d as restrictedRowsSql, i as scopeColumn, l as relationArmSql } from "./compile-B_oJqmIg.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $t as Snapshot, E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-
|
|
1
|
+
import { $t as Snapshot, E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-D-GwfQTc.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
3
|
import { a as OperationInput, t as Operation } from "../operations-Ci_rT6Uo.js";
|
|
4
|
-
import { a as PermDock } from "../permdock-
|
|
5
|
-
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-
|
|
6
|
-
import { a as ProtectTarget, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-
|
|
4
|
+
import { a as PermDock } from "../permdock-ffY4CMd9.js";
|
|
5
|
+
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-3OnXjZ2D.js";
|
|
6
|
+
import { a as ProtectTarget, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-BdmfnbJM.js";
|
|
7
7
|
import { RequestMiddleware, RequestMiddlewareAfterServer, createMiddleware } from "@tanstack/react-start";
|
|
8
8
|
//#region src/tanstack-start/create.d.ts
|
|
9
9
|
type TanStackStartPermDockOptions<TUser = unknown> = FetchAdapterOptions<Request, TUser>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-
|
|
2
|
-
import { t as fetchAdapter } from "../fetch-adapter-
|
|
1
|
+
import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-h3KoJAPa.js";
|
|
2
|
+
import { t as fetchAdapter } from "../fetch-adapter-DH-NJPbL.js";
|
|
3
3
|
import { createMiddleware } from "@tanstack/react-start";
|
|
4
4
|
//#region src/tanstack-start/create.ts
|
|
5
5
|
function createPermDock(policy, options) {
|
package/dist/terminal/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as Policy, Kt as Instant, M as PolicyVocabulary, _r as Principal, qn as Decision, yr as Subject } from "../policy-types-
|
|
1
|
+
import { E as Policy, Kt as Instant, M as PolicyVocabulary, _r as Principal, qn as Decision, yr as Subject } from "../policy-types-D-GwfQTc.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
4
|
-
import { m as ApprovalStore } from "../types-
|
|
5
|
-
import { a as ProblemDetails, t as ApprovalHint } from "../errors-
|
|
6
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
3
|
+
import { a as PermDock } from "../permdock-ffY4CMd9.js";
|
|
4
|
+
import { m as ApprovalStore } from "../types-CqcsNCaN.js";
|
|
5
|
+
import { a as ProblemDetails, t as ApprovalHint } from "../errors-TpzkEKgJ.js";
|
|
6
|
+
import { t as InstanceOptions } from "../instance-options-2sFGSdsf.js";
|
|
7
7
|
//#region src/terminal/types.d.ts
|
|
8
8
|
type TokenSourceName = "device" | "keychain" | "env" | "ci-oidc";
|
|
9
9
|
type TokenSource = TokenSourceName | {
|
package/dist/terminal/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t a
|
|
|
3
3
|
import { h as secondsAt } from "../time-nR1JesoH.js";
|
|
4
4
|
import { r as isSubject } from "../subject-C7RddW0G.js";
|
|
5
5
|
import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
|
|
6
|
-
import { l as withApp } from "../permdock-
|
|
6
|
+
import { l as withApp } from "../permdock-D-_WrdKu.js";
|
|
7
7
|
import { n as readBodyText } from "../body-text-DQhcmqdY.js";
|
|
8
|
-
import { l as storedApprovalToken, s as resumeDecision } from "../helpers-
|
|
8
|
+
import { l as storedApprovalToken, s as resumeDecision } from "../helpers-DmqGy63f.js";
|
|
9
9
|
import { t as timeoutSignal } from "../timeout-D51niuQP.js";
|
|
10
|
-
import { n as resolveOrNull, t as buildInstance } from "../build-instance-
|
|
10
|
+
import { n as resolveOrNull, t as buildInstance } from "../build-instance-BFMFQdE_.js";
|
|
11
11
|
import { a as refreshCredential, o as revokeCredential, s as runDeviceFlow, t as TERMINAL_TIMEOUT_MS } from "../device-BwbJNmb2.js";
|
|
12
12
|
import { i as writeCredentials, n as deleteCredentials, r as readCredentials } from "../storage-C2bWdvJH.js";
|
|
13
13
|
import { createInterface } from "node:readline";
|
package/dist/testing/core.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-
|
|
1
|
+
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-D87h2kpR.js";
|
|
2
2
|
export { type DescribePolicyConfig, type MatrixCell, type MatrixOutcome, type OrmParityCase, type OrmParityOptions, type OrmParityReport, type OrmParityRunInput, type OrmParityScenario, type PolicyMatrixCell, type PolicyMatrixReport, type RlsDbOutcome, type RlsFieldsOutcome, type RlsParityCase, type RlsParityFixture, type RlsParityOptions, type RlsParityReport, type RlsParitySubject, type RlsQueryFn, type RlsQueryResult, policyMatrix, testOrmParity, testRlsParity };
|
package/dist/testing/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as policyMatrix, t as testOrmParity, n as testRlsParity } from "../core-
|
|
1
|
+
export { r as policyMatrix, t as testOrmParity, n as testRlsParity } from "../core-B8sLve3z.js";
|