permdock 0.8.0 → 0.10.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/{action-result-CL-QCITA.d.ts → action-result-BcudBQOF.d.ts} +1 -1
- package/dist/active-tenant-DVee32-T.js +39 -0
- package/dist/{adoption-scan-BLs67P1l.js → adoption-scan-0oFt2RD5.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-prompt-PYagyQUj.d.ts → approval-prompt-3BqWczTt.d.ts} +1 -1
- package/dist/approvals/index.d.ts +3 -3
- package/dist/{arazzo-3RhGfkAK.js → arazzo-DA9PCXew.js} +1 -1
- package/dist/{arazzo-B5-ulWif.js → arazzo-DhxDfYt-.js} +2 -2
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +1 -1
- package/dist/{audience-BAkBDMqn.js → audience-DTjR8xet.js} +1 -1
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +1 -1
- package/dist/{automation-DqEoWHBc.d.ts → automation-C6Jg75xq.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-supabase/index.d.ts +192 -27
- package/dist/better-supabase/index.js +248 -64
- package/dist/{bind-D_sZSVA3.js → bind-BNQA9JK9.js} +7 -3
- package/dist/{bind-Cp2hBHzP.d.ts → bind-YYjvfpB9.d.ts} +12 -7
- package/dist/{build-instance-CNWaYJyr.js → build-instance-BWXqwQYU.js} +1 -1
- package/dist/{capability-ChuiONQU.d.ts → capability-Di9tiUvi.d.ts} +1 -1
- package/dist/{casbin-H0rKxBx2.js → casbin-BJu2liqU.js} +1 -1
- package/dist/{casbin-cbSbhT_k.js → casbin-BkhqGh2z.js} +1 -1
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +2 -2
- package/dist/{catalog-BFpz2EmT.js → catalog-CGlSwU6j.js} +2 -2
- package/dist/catalog-D3oS2GH3.js +1 -0
- package/dist/{catalog-DCspHDc8.js → catalog-amPDr0JQ.js} +1 -1
- package/dist/{catalog-operations-Dadrl7Z-.js → catalog-operations-DeHTrJSV.js} +1 -1
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/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 +9 -4
- package/dist/cli/index.js +11 -3
- package/dist/cloud/index.d.ts +8 -8
- package/dist/{cloud-BFlGMaak.js → cloud-3RIuS4E9.js} +2 -2
- package/dist/{codemod-DLQ9Zpo4.js → codemod-DLcp-B6v.js} +2 -2
- package/dist/{codemod-DWSN2erG.js → codemod-DRl_w-bY.js} +1 -1
- package/dist/collect-D-eroIfV.js +1 -0
- package/dist/{collect-Bzv3le0A.js → collect-D9Tt0Bcx.js} +2 -2
- package/dist/{collect-B7ZFAJU3.js → collect-WCl8cJQV.js} +1 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-BFzysW3o.d.ts → compile-BEklRUYo.d.ts} +2 -2
- package/dist/{completion-saoYiRFO.js → completion-VSWvaaPO.js} +1 -1
- package/dist/{config-BwPBfN0t.js → config-BR23fL8m.js} +2 -2
- package/dist/{config-DBeXXmBF.js → config-kL36AxkE.js} +1 -1
- package/dist/{config-report-BipSWA6V.js → config-report-osnfUNg5.js} +3 -3
- package/dist/{config-shape-ykV0Vm2n.js → config-shape-tsxHx71E.js} +2 -1
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +2 -2
- package/dist/{core-hWIARPDz.d.ts → core-CFepFiDP.d.ts} +2 -2
- package/dist/{core-H-mbhpZc.js → core-DzVINFbU.js} +3 -3
- package/dist/{create-Cq4Uox0f.js → create-6EwRQlig.js} +3 -3
- package/dist/{create-_noSrY1T.js → create-BLPKnJKa.js} +23 -7
- package/dist/{create-BSNrVuxh.d.ts → create-BPUopdfL.d.ts} +7 -7
- package/dist/{create-CM1FciYG.d.ts → create-CDd9c22W.d.ts} +15 -6
- package/dist/{create-BVq1lNQE.d.ts → create-DBvUsgzK.d.ts} +4 -4
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-CHNlVInN.d.ts → denied-text-DHldhVUv.d.ts} +1 -1
- package/dist/{describe-ByS9LgHK.d.ts → describe-BbFPBSms.d.ts} +1 -1
- package/dist/{diff-CN8IYhC_.js → diff-BwR1JdP2.js} +1 -1
- package/dist/{diff-iZWV65nC.js → diff-CQegtBAo.js} +2 -2
- package/dist/{doctor-D3wo-yuz.js → doctor-B9FY9H0F.js} +2 -2
- package/dist/{doctor-CHD1M9R5.js → doctor-DfTnMaUt.js} +144 -16
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +1 -1
- package/dist/{errors-zi_4T-rx.d.ts → errors-BIM4MFsJ.d.ts} +1 -1
- package/dist/{evaluate-Dd8Ta0Ie.js → evaluate-BAmf_AQd.js} +13 -4
- package/dist/{evaluations-z8dQFDaN.d.ts → evaluations-DOWuBpWv.d.ts} +3 -3
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +2 -2
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +1 -1
- package/dist/{fetch-adapter-C1DCvpqV.d.ts → fetch-adapter-BIbBAtPZ.d.ts} +2 -2
- package/dist/{fetch-adapter-JL43jD3E.js → fetch-adapter-dPTgJVHd.js} +1 -1
- package/dist/{fields-D0vUI6dq.js → fields-DI8s3cPl.js} +1 -1
- package/dist/{gen-DWCYcMQM.js → gen-DuAhghDw.js} +2 -2
- package/dist/{gen-B5kvbAoZ.js → gen-DwgCSC6V.js} +1 -1
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +2 -2
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +1 -1
- package/dist/{hosted-Cmtxogd0.d.ts → hosted-DVxlLZMe.d.ts} +1 -1
- package/dist/{import-CST57XLp.js → import-CNBF96hB.js} +2 -2
- package/dist/{import-_YqhhwvX.js → import-Iuk9mx8A.js} +1 -1
- package/dist/{index-BhxEUY9J.d.ts → index-BinlXeU-.d.ts} +2 -2
- package/dist/{index-B8s204GL.d.ts → index-CV-7DWeD.d.ts} +4 -4
- package/dist/{index-BW_0MZOS.d.ts → index-Cay5-Kvx.d.ts} +13 -8
- package/dist/{index-_9UiQIkt.d.ts → index-DJwEgYzA.d.ts} +4 -4
- package/dist/{index-BT5-1VsX.d.ts → index-Dj2qF9VC.d.ts} +1 -1
- package/dist/{index-Bv5iXPqU.d.ts → index-ymept53A.d.ts} +4 -4
- package/dist/index.d.ts +16 -15
- package/dist/index.js +6 -6
- package/dist/{init-cE3A8aXq.js → init-DeoSvkh2.js} +1 -1
- package/dist/{init-Dz_PsHdv.js → init-fNF_XmTa.js} +3 -3
- package/dist/{instance-options-B0KXqTrJ.d.ts → instance-options-CoHn-0e8.d.ts} +1 -1
- package/dist/{instance-snapshot--JWiTrvO.js → instance-snapshot-DuWf1cT3.js} +13 -8
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +1 -1
- package/dist/{kernel-C-fYydV2.js → kernel-qv4cr9w8.js} +4 -4
- package/dist/kysely/index.d.ts +3 -3
- package/dist/{login-DplQ0s84.js → login-CutVtcmQ.js} +1 -1
- package/dist/{login-D-8tMqzo.js → login-DYazeWc9.js} +3 -3
- package/dist/{manifest-Cgiq5oqc.js → manifest-B4ENCp2I.js} +35 -35
- package/dist/{manifest-CzzWtnAb.d.ts → manifest-B5yF3CIq.d.ts} +19 -0
- package/dist/{manifest-wg8WkkpD.js → manifest-BXTbHNIV.js} +1 -1
- package/dist/{manifest-schema-2r37XRhD.js → manifest-schema-DQkBK2Mr.js} +28 -1
- package/dist/{map-claims-BNWCJtmP.js → map-claims-C-nv08_n.js} +2 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +4 -4
- package/dist/{migrate-B7oP_sQU.js → migrate-BJHxQqT5.js} +2 -2
- package/dist/{module-values-BJTBdo6y.js → module-values-B1EVTkHP.js} +1 -1
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +32 -12
- package/dist/next/index.js +15 -8
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +1 -1
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-VeHHU2l9.js → openapi-C-ADypaY.js} +1 -1
- package/dist/{openapi-CBZUhA3l.js → openapi-DFj0cirS.js} +2 -2
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +3 -3
- package/dist/{output-tkju6U7R.js → output-LsbLe41I.js} +1 -1
- package/dist/{ownership-B4L59T9u.js → ownership-qqBuGJXr.js} +11 -6
- package/dist/{parse-local-manifest-BQhTlLQS.d.ts → parse-local-manifest-CCmbhnxP.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-L-_I_3zP.js → permdock-BvjivVb9.js} +143 -107
- package/dist/{permdock-B6Sf4T_S.d.ts → permdock-CprAPN3w.d.ts} +9 -2
- package/dist/{permissions-mDcTWoBs.js → permissions-CYcHj_w7.js} +1 -1
- package/dist/{policy-Ba4bDhaj.d.ts → policy-BycVKnXv.d.ts} +1 -1
- package/dist/{policy-from-catalog-CJgOm6aq.js → policy-from-catalog-CU3An8uP.js} +1 -1
- package/dist/{policy-types-CCiDRZBH.d.ts → policy-types-DGIO_gxq.d.ts} +54 -18
- package/dist/{postgrest-DicQyqm-.d.ts → postgrest-D5nUGm-c.d.ts} +4 -3
- package/dist/{postgrest-D4nuPXIQ.js → postgrest-DAxFltvO.js} +35 -56
- package/dist/{powersync-DXqGuq9A.js → powersync-B_8uwz7f.js} +2 -2
- package/dist/powersync-CSzDCHRu.js +1 -0
- package/dist/{powersync-DHNQX06W.js → powersync-DUT-UKgw.js} +190 -38
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{protected-action-BE7N_Luo.d.ts → protected-action-D8x73IGm.d.ts} +6 -6
- package/dist/{provider-DXfq5c2d.d.ts → provider-DfLeek9O.d.ts} +1 -1
- package/dist/{pull-CwpGaQSi.js → pull-DQCgvJSC.js} +2 -2
- package/dist/pull-DYbyod1f.js +1 -0
- package/dist/{push-DgssgzkK.js → push-Dq_ca4-j.js} +3 -3
- package/dist/{pushed-policy-ITwYKvvH.js → pushed-policy-CDuOL2de.js} +1 -1
- package/dist/{pushed-policy-D1Eoi6NM.d.ts → pushed-policy-CryQheKq.d.ts} +1 -1
- package/dist/react/index.d.ts +7 -7
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react-native/index.d.ts +9 -9
- package/dist/{replay-DNftIb_R.d.ts → replay-Bs9Df2fQ.d.ts} +1 -1
- package/dist/{request-context-C25ilqiJ.js → request-context-Duzdf0cd.js} +1 -1
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-CF7xXLSG.js → resolve-names-Y1Cb22cp.js} +4 -4
- package/dist/{rls-CNEH2_BG.js → rls-B57mIeVq.js} +34 -20
- package/dist/{rls-Ca8Jz9b5.js → rls-j0YrFPpW.js} +1 -1
- package/dist/{rpc-fNqAIqQk.js → rpc-vHIwyXCp.js} +1 -1
- package/dist/run-BATawNVH.js +1 -0
- package/dist/{run-Bz26OTfO.js → run-CLP_fQUF.js} +3 -3
- package/dist/{run-ticket-Dv7aF7Dk.js → run-ticket-DfnZCh-u.js} +19 -6
- package/dist/{run-ticket-DbWI9f99.d.ts → run-ticket-ylovhyFQ.d.ts} +18 -3
- package/dist/{saas-iWnUdwCt.js → saas-DK4V-3Is.js} +2 -2
- package/dist/{scan-DCj1KQfn.js → scan-B7xrAvRm.js} +1 -1
- package/dist/{schema-Dst9I9Gs.js → schema-3PJ8wAeL.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +2 -2
- package/dist/{server-types-CIlpSA2G.d.ts → server-types-CyRN0-Cd.d.ts} +15 -8
- package/dist/{shared-Afctg7B0.js → shared-DrGLwM3s.js} +1 -1
- package/dist/{sink-Dvi7YZG_.d.ts → sink-B5zoUW_O.d.ts} +2 -2
- package/dist/{skills-OuoMR49L.js → skills-BUI8DMqy.js} +1 -1
- package/dist/{skills-Bjj7BNEQ.js → skills-iwbRxavw.js} +1 -1
- package/dist/{snapshot-cache-BAXZ0KOp.d.ts → snapshot-cache-BjAWkchD.d.ts} +1 -1
- package/dist/solid/index.d.ts +6 -6
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +2 -2
- package/dist/{sources-CMAM-2A3.js → sources-C4vkzZJV.js} +12 -7
- package/dist/{types-ah9NlU6j.d.ts → sources-oB1Hg1Fm.d.ts} +316 -2
- package/dist/{src-DZ0l9UAg.js → src-C_pi2Rnh.js} +106 -5
- package/dist/ssf/index.d.ts +3 -3
- package/dist/{standard-webhooks-C-qX4mJW.d.ts → standard-webhooks-DOYEuOLx.d.ts} +2 -2
- package/dist/{stores-C0Kta5Ft.d.ts → stores-DZJvxFIZ.d.ts} +6 -6
- package/dist/{stream-ltuLdtTG.d.ts → stream-9y9qw51m.d.ts} +1 -1
- package/dist/supabase/index.d.ts +5 -6
- package/dist/supabase/index.js +4 -4
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +4 -4
- package/dist/{supabase-BL1qJzzY.js → supabase-B1EfuD47.js} +2 -2
- package/dist/{supabase-D39cuGPt.js → supabase-BaizG0n7.js} +2 -2
- package/dist/{supabase-hook-B-yXnzUl.js → supabase-hook-BT2P9wah.js} +110 -47
- package/dist/supabase-hook-CbvGAutK.js +1 -0
- package/dist/{supautils-BU-pAEpf.js → supautils-DBKOoyjn.js} +247 -200
- package/dist/svelte/index.d.ts +6 -6
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/source.d.ts +6 -6
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +1 -1
- package/dist/{tables-DeMNEy6V.js → tables-DimBcVWY.js} +3 -3
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +1 -1
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +2 -2
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +1 -1
- package/dist/testing/fixtures/index.js +26 -28
- package/dist/testing/index.d.ts +23 -21
- package/dist/testing/index.js +64 -10
- package/dist/testing/saas/index.d.ts +3 -3
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +2 -2
- package/dist/{type-helpers-BIPIDa6a.d.ts → type-helpers-c7Xo_2Cu.d.ts} +1 -1
- package/dist/{types-B2mlGuhW.d.ts → types-B2efzoSX.d.ts} +1 -1
- package/dist/{types-DHKPcqzr.d.ts → types-B6ExllNo.d.ts} +2 -2
- package/dist/{types-AMJ5qoU_.d.ts → types-BB-zWDcR.d.ts} +4 -4
- package/dist/{types-djVzLlIV.d.ts → types-CEinc15V.d.ts} +4 -4
- package/dist/{types-yUuPR5Hy.d.ts → types-CN0LsqbK.d.ts} +3 -3
- package/dist/{types-HzqOtvsJ.d.ts → types-CWBsAwqn.d.ts} +4 -4
- package/dist/{types-DC1Loeh3.d.ts → types-Cklw5hJo.d.ts} +26 -3
- package/dist/{types-B_tiYvk8.d.ts → types-DLvhVm1r.d.ts} +1 -1
- package/dist/{types-B4uqKDnp.d.ts → types-DlelvQk4.d.ts} +2 -2
- package/dist/{types-DjuMBNF9.d.ts → types-DsHGPtkR.d.ts} +2 -2
- package/dist/{types-BJk0BKRX.d.ts → types-rCRV4Ge-.d.ts} +4 -4
- package/dist/{types-B_d_g7T3.d.ts → types-tQB2CEnY.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-ab0PdusX.js → usage-B1ZJOUdr.js} +1 -1
- package/dist/{usage-CxEzS4ey.js → usage-t_nXnwCW.js} +3 -3
- package/dist/usage-weohzv2f.js +1 -0
- package/dist/{validation-error-YGg2mXyH.d.ts → validation-error-uvp-kyfO.d.ts} +1 -1
- package/dist/{verify-DZeqoWu5.js → verify-jHrbmn-E.js} +9 -9
- package/dist/version-cache-Df11C2Qp.d.ts +51 -0
- package/dist/vue/index.d.ts +6 -6
- package/dist/{waiter-Bu9zAlE0.d.ts → waiter-CqUKX6CY.d.ts} +2 -2
- package/dist/{watch-Cx_WciLE.js → watch-Bpci3hBY.js} +2 -2
- package/dist/watch-COuvly20.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/{who-can-rI7dCR9Q.js → who-can-BoDJm0Nc.js} +1 -1
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +23 -7
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-DlJE3gS_.d.ts → wrap-DxXB54Wu.d.ts} +2 -2
- package/package.json +3 -3
- package/schemas/run-v1.json +16 -0
- package/schemas/supabase-manifest-v1.json +28 -0
- package/skills/permdock-agents/references/operations-automations-chat.md +1 -0
- package/skills/permdock-data/references/queries-and-rls.md +1 -1
- package/skills/permdock-wire/references/adapters.md +4 -3
- package/dist/catalog-mRQQQhNK.js +0 -1
- package/dist/collect-B5BL3klN.js +0 -1
- package/dist/powersync-Djf-zCpB.js +0 -1
- package/dist/pull-B65ndFNZ.js +0 -1
- package/dist/run-D-JE8QWb.js +0 -1
- package/dist/sources-B1Os_YUu.d.ts +0 -312
- package/dist/supabase-hook-H-MtE9Wd.js +0 -1
- package/dist/usage-CYeXek0p.js +0 -1
- package/dist/watch-DB42U1ib.js +0 -1
|
@@ -7,26 +7,26 @@ import { t as policyRowConditionKeys } from "./row-conditions-BAGHOmVq.js";
|
|
|
7
7
|
import { o as sqlFiles } from "./files-BSjrtIHw.js";
|
|
8
8
|
import { c as requirePolicy } from "./load-DjSU5KXO.js";
|
|
9
9
|
import { i as qualifySqlTable, r as escapeSqlIdent } from "./sql-0WjxIp9g.js";
|
|
10
|
-
import "./sources-
|
|
11
|
-
import { t as policyFromCatalog } from "./policy-from-catalog-
|
|
10
|
+
import "./sources-C4vkzZJV.js";
|
|
11
|
+
import { t as policyFromCatalog } from "./policy-from-catalog-CU3An8uP.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-
|
|
14
|
+
import { a as nonEmptyOr } from "./output-LsbLe41I.js";
|
|
15
15
|
import { i as requirePeer, n as packageManagerOf, t as addLine } from "./peer-Q0fuZ6hx.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-DQCgvJSC.js";
|
|
18
18
|
import { n as MIGRATION_DIRS } from "./constants-DcJABbLW.js";
|
|
19
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-BIQ_9pIs.js";
|
|
20
|
-
import {
|
|
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-
|
|
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-BT2P9wah.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-DrGLwM3s.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-DimBcVWY.js";
|
|
23
|
+
import { c as breakGlassKey, i as assignmentSql, l as collectGrants, n as ownershipSql, s as breakGlassHolder } from "./ownership-qqBuGJXr.js";
|
|
24
24
|
import { a as splitUndiffed } from "./deciding-columns-NB4wcyBf.js";
|
|
25
25
|
import { t as connectPgPool } from "./pg-DQTqRrou.js";
|
|
26
|
-
import { n as
|
|
27
|
-
import {
|
|
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
|
|
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-DI8s3cPl.js";
|
|
27
|
+
import { n as permissionHoldersSql } from "./resolve-names-Y1Cb22cp.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-jHrbmn-E.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-DBKOoyjn.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";
|
|
@@ -1409,17 +1409,24 @@ function sectionsSql(input, policy, options, built, generated, jsonSchema, warni
|
|
|
1409
1409
|
if (ctx.assignments !== void 0 && (ownership === void 0 || ownership.assigns.length === 0)) warnings.push("rls.assignments needs a role that declares assigns: no assignment trigger is written");
|
|
1410
1410
|
let approvals;
|
|
1411
1411
|
try {
|
|
1412
|
-
approvals = approvalsSql(ctx, rls?.approvals, jsonSchema ?? false);
|
|
1412
|
+
approvals = approvalsSql(ctx, rls?.approvals, jsonSchema ?? false, readOnlyActorKinds(rls?.readOnlyActors) !== void 0);
|
|
1413
1413
|
} catch (cause) {
|
|
1414
1414
|
return { refusal: describeError(cause) };
|
|
1415
1415
|
}
|
|
1416
1416
|
if (typeof rls?.approvals === "object" && rls.approvals.delegations === true && ctx.authorize !== "database") warnings.push("rls.approvals.delegations with --authorize jwt: permdock_is_approver cannot read a delegator's permissions from the caller's token, so in SQL a cover never satisfies a holder() approver; approvalsHandler still does");
|
|
1417
1417
|
const graphed = graphSql(ctx, graph, tableNames(rls?.tables));
|
|
1418
1418
|
let rowHelpers = "";
|
|
1419
|
-
if (rls?.rowHelpers !== void 0 || inheritTargets(policy).length > 0)
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1419
|
+
if (rls?.rowHelpers !== void 0 || inheritTargets(policy).length > 0) {
|
|
1420
|
+
const readable = (grants) => [...options.fieldsMode === void 0 ? grants.branches : rowBranches(grants.branches), ...grants.actionBranches];
|
|
1421
|
+
try {
|
|
1422
|
+
const narrowed = compileGrants(policy, {
|
|
1423
|
+
...ctx,
|
|
1424
|
+
candidates: CANDIDATES
|
|
1425
|
+
}, tableNames(rls?.tables), [], input.skipClosures, true);
|
|
1426
|
+
rowHelpers = rowHelpersSql(ctx, policy, readable(compiled), rls?.rowHelpers ?? [], tableNames(rls?.tables), warnings, readable(narrowed));
|
|
1427
|
+
} catch (cause) {
|
|
1428
|
+
return { refusal: describeError(cause) };
|
|
1429
|
+
}
|
|
1423
1430
|
}
|
|
1424
1431
|
const breakGlass = breakGlassSql(ctx, breakGlassEntries(policy, tableNames(rls?.tables)));
|
|
1425
1432
|
return [
|
|
@@ -2225,6 +2232,13 @@ const WRITES = [
|
|
|
2225
2232
|
"delete"
|
|
2226
2233
|
];
|
|
2227
2234
|
/**
|
|
2235
|
+
* `rls generate` inlines the check in its `<table>_<command>_read_only_actors`
|
|
2236
|
+
* policies.
|
|
2237
|
+
*/
|
|
2238
|
+
function inlinesActorCheck(expression) {
|
|
2239
|
+
return expression.includes("'act'") && expression.includes("'read_only'");
|
|
2240
|
+
}
|
|
2241
|
+
/**
|
|
2228
2242
|
* Each table and write command whose permissive policies reach `authenticated`
|
|
2229
2243
|
* (or `public`) without the read-only actor check: no restrictive policy for
|
|
2230
2244
|
* the command calls `permdock_actor_may_write()`, and some permissive one does
|
|
@@ -2238,7 +2252,7 @@ function unguardedWrites(policies, fn) {
|
|
|
2238
2252
|
const permissive = applying.filter((policy) => policy.restrictive !== true && (policy.roles ?? []).some((role) => role === "authenticated" || role === "public"));
|
|
2239
2253
|
if (permissive.length === 0) continue;
|
|
2240
2254
|
const calls = (expression) => expression.includes(fn);
|
|
2241
|
-
if (!(applying.some((policy) => policy.restrictive === true && calls(policy.expression)) || permissive.every((policy) => calls(policy.expression)))) out.push(rlsFinding("write-unguarded", table, command, `${table}: ${command} policies for authenticated do not call ${fn}(), so a read-only support or impersonation session can write (rls.readOnlyActors)`));
|
|
2255
|
+
if (!(applying.some((policy) => policy.restrictive === true && (calls(policy.expression) || inlinesActorCheck(policy.expression))) || permissive.every((policy) => calls(policy.expression)))) out.push(rlsFinding("write-unguarded", table, command, `${table}: ${command} policies for authenticated do not call ${fn}(), so a read-only support or impersonation session can write (rls.readOnlyActors)`));
|
|
2242
2256
|
}
|
|
2243
2257
|
return out;
|
|
2244
2258
|
}
|
|
@@ -2467,7 +2481,7 @@ async function migrate(input) {
|
|
|
2467
2481
|
output: generated.output
|
|
2468
2482
|
};
|
|
2469
2483
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls migrate", input.cwd, PGSQL_PARSER_MAJOR);
|
|
2470
|
-
const { migrateTarget, runRlsMigrate } = await import("./migrate-
|
|
2484
|
+
const { migrateTarget, runRlsMigrate } = await import("./migrate-BJHxQqT5.js");
|
|
2471
2485
|
return runRlsMigrate({
|
|
2472
2486
|
cwd: input.cwd,
|
|
2473
2487
|
sql: input.sql,
|
|
@@ -2583,7 +2597,7 @@ async function runRls(input) {
|
|
|
2583
2597
|
}
|
|
2584
2598
|
case "import": {
|
|
2585
2599
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls import", input.cwd, PGSQL_PARSER_MAJOR);
|
|
2586
|
-
const { runRlsImport } = await import("./import-
|
|
2600
|
+
const { runRlsImport } = await import("./import-CNBF96hB.js");
|
|
2587
2601
|
return runRlsImport({
|
|
2588
2602
|
cwd: input.cwd,
|
|
2589
2603
|
config: input.config,
|
|
@@ -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-B57mIeVq.js")).runRls(input);
|
|
196
196
|
}
|
|
197
197
|
const generate = defineLeaf({
|
|
198
198
|
flags: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { s as requestFromContext } from "./http-DKLXrFGk.js";
|
|
3
3
|
import { n as tenantScope } from "./adapter-context-CIQpQxbE.js";
|
|
4
|
-
import { t as adapterKernel } from "./bind-
|
|
4
|
+
import { t as adapterKernel } from "./bind-BNQA9JK9.js";
|
|
5
5
|
import { r as guardIterable } from "./stream-CDvF0sJm.js";
|
|
6
6
|
//#region src/server/rpc.ts
|
|
7
7
|
/** The tRPC and oRPC error code for a Problem Details status. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as run } from "./run-CLP_fQUF.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as dateAt } from "./time-nR1JesoH.js";
|
|
2
2
|
import { a as describeError, l as problemOf, n as CliError, r as cliProblem, s as kindOfCode } from "./errors-Vpu6rKHl.js";
|
|
3
3
|
import { s as cliVersion } from "./version-DMQ0dnN5.js";
|
|
4
|
-
import { a as resolveCwd, i as readConfig } from "./config-
|
|
4
|
+
import { a as resolveCwd, i as readConfig } from "./config-BR23fL8m.js";
|
|
5
5
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
6
6
|
import { a as suggestion, i as parseLeaf, n as flagSpellings, o as GLOBAL_FLAGS, r as parseFlags } from "./args-0FrVs5EH.js";
|
|
7
7
|
import { r as progressReporter, t as redact } from "./credentials-CdDxp7jN.js";
|
|
8
|
-
import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-
|
|
8
|
+
import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-B4ENCp2I.js";
|
|
9
9
|
import { t as createStyle } from "./style-Ds11Hmk4.js";
|
|
10
|
-
import { i as githubAnnotations, n as envelope, o as sarifLog, t as dataOf } from "./output-
|
|
10
|
+
import { i as githubAnnotations, n as envelope, o as sarifLog, t as dataOf } from "./output-LsbLe41I.js";
|
|
11
11
|
import { i as renameMessage, r as flagRename, t as COMMAND_MOVES } from "./renames-CGj7YwcQ.js";
|
|
12
12
|
import { stripVTControlCharacters } from "node:util";
|
|
13
13
|
import { existsSync, statSync } from "node:fs";
|
|
@@ -26,7 +26,8 @@ const RUN_TICKET_CLAIMS = Object.freeze([
|
|
|
26
26
|
"automation",
|
|
27
27
|
"tenant",
|
|
28
28
|
"trigger",
|
|
29
|
-
"binding"
|
|
29
|
+
"binding",
|
|
30
|
+
"resource"
|
|
30
31
|
]);
|
|
31
32
|
const RUN_KINDS = [
|
|
32
33
|
"automation",
|
|
@@ -97,6 +98,14 @@ function parseAutomation(value) {
|
|
|
97
98
|
version: record["version"]
|
|
98
99
|
};
|
|
99
100
|
}
|
|
101
|
+
function parseResource(value) {
|
|
102
|
+
const record = ownRecord(value);
|
|
103
|
+
if (record === void 0 || !isId(record["type"]) || !isId(record["id"])) return;
|
|
104
|
+
return {
|
|
105
|
+
type: record["type"],
|
|
106
|
+
id: record["id"]
|
|
107
|
+
};
|
|
108
|
+
}
|
|
100
109
|
function parseBinding(value) {
|
|
101
110
|
const record = ownRecord(value);
|
|
102
111
|
if (record === void 0) return;
|
|
@@ -140,7 +149,8 @@ function parseBody(record) {
|
|
|
140
149
|
const automation = optional(record, "automation", parseAutomation);
|
|
141
150
|
const trigger = optional(record, "trigger", parseTrigger);
|
|
142
151
|
const binding = optional(record, "binding", parseBinding);
|
|
143
|
-
|
|
152
|
+
const resource = optional(record, "resource", parseResource);
|
|
153
|
+
if (!act.ok || !details.ok || !automation.ok || !trigger.ok || !binding.ok || !resource.ok || scope === void 0 && details.value === void 0 || kind === "automation" !== (automation.value !== void 0)) return;
|
|
144
154
|
return compact({
|
|
145
155
|
v: 1,
|
|
146
156
|
sub,
|
|
@@ -151,7 +161,8 @@ function parseBody(record) {
|
|
|
151
161
|
automation: automation.value,
|
|
152
162
|
tenant,
|
|
153
163
|
trigger: trigger.value,
|
|
154
|
-
binding: binding.value
|
|
164
|
+
binding: binding.value,
|
|
165
|
+
resource: resource.value
|
|
155
166
|
});
|
|
156
167
|
}
|
|
157
168
|
/**
|
|
@@ -218,9 +229,10 @@ function signRunTicket(input, signer, options = {}) {
|
|
|
218
229
|
automation: input.automation,
|
|
219
230
|
tenant: input.tenant,
|
|
220
231
|
trigger: input.trigger,
|
|
221
|
-
binding: input.binding
|
|
232
|
+
binding: input.binding,
|
|
233
|
+
resource: input.resource
|
|
222
234
|
}));
|
|
223
|
-
if (body === void 0) invalid("is invalid: check principal, kind, automation, delegation, trigger and
|
|
235
|
+
if (body === void 0) invalid("is invalid: check principal, kind, automation, delegation, trigger, binding and resource");
|
|
224
236
|
if (input.id !== void 0 && !isId(input.id)) invalid("id must be a non-empty string");
|
|
225
237
|
return signer.sign(body, compact({
|
|
226
238
|
typ: RUN_TICKET_TYP,
|
|
@@ -338,7 +350,8 @@ async function subjectFromRunTicket(token, options) {
|
|
|
338
350
|
id: ticket.jti,
|
|
339
351
|
kind: ticket.kind,
|
|
340
352
|
automation: ticket.automation,
|
|
341
|
-
binding: ticket.binding
|
|
353
|
+
binding: ticket.binding,
|
|
354
|
+
resource: ticket.resource
|
|
342
355
|
});
|
|
343
356
|
return Object.freeze(compact({
|
|
344
357
|
principal: Object.freeze({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as PrincipalSource } from "./permdock-
|
|
1
|
+
import { Wt as Instant, ar as AuthorizationDetail, hr as Subject, ht as TokenVerifier, lr as Delegation, mt as TokenSigner, pr as Principal, pt as TokenFailureCause, rn as AuthEvent, rr as Actor } from "./policy-types-DGIO_gxq.js";
|
|
2
|
+
import { _ as PrincipalSource } from "./permdock-CprAPN3w.js";
|
|
3
3
|
//#region src/server/run-ticket.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* What started the run: a saved automation, a background job, or a caller's own
|
|
@@ -24,6 +24,14 @@ type RunAutomation = {
|
|
|
24
24
|
readonly id: string;
|
|
25
25
|
readonly version: number | string;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* The record a run is bound to. `authorization_details` carries the binding as
|
|
29
|
+
* `identifier`; this claim names it for the adapter and the audit trail.
|
|
30
|
+
*/
|
|
31
|
+
type RunResource = {
|
|
32
|
+
readonly type: string;
|
|
33
|
+
readonly id: string;
|
|
34
|
+
};
|
|
27
35
|
/**
|
|
28
36
|
* The v1 claims of a `vnd.permdock.run+jwt`. At least one of `scope` and
|
|
29
37
|
* `authorization_details` is present.
|
|
@@ -49,6 +57,7 @@ type RunTicket = {
|
|
|
49
57
|
*/
|
|
50
58
|
readonly trigger?: Readonly<Record<string, unknown>>;
|
|
51
59
|
readonly binding?: RunBinding;
|
|
60
|
+
readonly resource?: RunResource;
|
|
52
61
|
};
|
|
53
62
|
/**
|
|
54
63
|
* Every v1 claim of a `vnd.permdock.run+jwt`, the set `parseRunTicket` keeps. A
|
|
@@ -70,6 +79,11 @@ type RunTicketInput = {
|
|
|
70
79
|
readonly tenant?: string;
|
|
71
80
|
readonly trigger?: Readonly<Record<string, unknown>>;
|
|
72
81
|
readonly binding?: RunBinding;
|
|
82
|
+
/**
|
|
83
|
+
* The record the run is bound to. Narrow `delegation` to it with an
|
|
84
|
+
* `authorization_details` `identifier`; this claim grants nothing.
|
|
85
|
+
*/
|
|
86
|
+
readonly resource?: RunResource;
|
|
73
87
|
/** `jti`; a fresh UUID when absent. */
|
|
74
88
|
readonly id?: string;
|
|
75
89
|
/** Lifetime in whole seconds. Exactly one of `expiresIn` and `expiresAt`. */
|
|
@@ -113,6 +127,7 @@ type RunContext = {
|
|
|
113
127
|
readonly kind: RunKind;
|
|
114
128
|
readonly automation?: RunAutomation;
|
|
115
129
|
readonly binding?: RunBinding;
|
|
130
|
+
readonly resource?: RunResource;
|
|
116
131
|
};
|
|
117
132
|
/** The principal of a run subject, with the verified ticket attached. */
|
|
118
133
|
type RunPrincipal = Principal & {
|
|
@@ -141,4 +156,4 @@ declare function signRunTicket(input: RunTicketInput, signer: TokenSigner, optio
|
|
|
141
156
|
*/
|
|
142
157
|
declare function subjectFromRunTicket(token: string | undefined | null, options: RunTicketSubjectOptions): Promise<Subject<RunPrincipal>>;
|
|
143
158
|
//#endregion
|
|
144
|
-
export { RunContext as a,
|
|
159
|
+
export { subjectFromRunTicket as _, RunContext as a, RunResource as c, RunTicketFailureCause as d, RunTicketInput as f, signRunTicket as g, parseRunTicket as h, RunBinding as i, RunTicket as l, RunTicketSubjectOptions as m, RunActClaim as n, RunKind as o, RunTicketOptions as p, RunAutomation as r, RunPrincipal as s, RUN_TICKET_CLAIMS as t, RunTicketAutomations as u };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { i as principal } from "./refs-C8BKxc_e.js";
|
|
3
3
|
import { a as deny, n as role, r as allow } from "./role-builder-BK2-T6oD.js";
|
|
4
|
-
import {
|
|
4
|
+
import { C as memoryLimitStore, S as limits, j as memoryCustomRoleSource, x as memoryRelationSource } from "./src-C_pi2Rnh.js";
|
|
5
5
|
import { h as secondsAt } from "./time-nR1JesoH.js";
|
|
6
6
|
import { l as relation, n as anyone } from "./grantee-Dke-9rd1.js";
|
|
7
7
|
import { r as definePolicy } from "./policy-CLQ8__GF.js";
|
|
8
8
|
import { s as quoteSqlLiteral } from "./sql-0WjxIp9g.js";
|
|
9
|
-
import { a as saasPlans, i as saasPermissions, o as saasRoles } from "./permissions-
|
|
9
|
+
import { a as saasPlans, i as saasPermissions, o as saasRoles } from "./permissions-CYcHj_w7.js";
|
|
10
10
|
//#region src/testing/saas/policy.ts
|
|
11
11
|
function isSubject(user) {
|
|
12
12
|
return user !== null && "context" in user && "principal" in user;
|
|
@@ -16,7 +16,7 @@ const scan = defineLeaf({
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
async run(ctx, { flags }) {
|
|
19
|
-
const { runAdoptionScan } = await import("./adoption-scan-
|
|
19
|
+
const { runAdoptionScan } = await import("./adoption-scan-0oFt2RD5.js");
|
|
20
20
|
return runAdoptionScan({
|
|
21
21
|
cwd: ctx.cwd,
|
|
22
22
|
srcPath: flags.src.length > 0 ? flags.src : ctx.config.collect?.srcPath ?? ["src"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { l as packageRoot } from "./version-DMQ0dnN5.js";
|
|
3
3
|
import { t as DRAFT_PINS } from "./pins-nqarl3oE.js";
|
|
4
|
-
import { a as nonEmptyOr } from "./output-
|
|
4
|
+
import { a as nonEmptyOr } from "./output-LsbLe41I.js";
|
|
5
5
|
import { t as require__2020 } from "./2020-CJbO8Bvz.js";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
package/dist/scim/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as SqlQuery } from "../sql-B80DFdpG.js";
|
|
2
|
-
import { A as ScimFilter, C as DirectoryUser, D as PATCH_SCHEMA, E as LIST_SCHEMA, F as ScimTokenOptions, I as USER_SCHEMA, L as isDirectoryNotFoundError, M as ScimPage, N as ScimPageResult, O as ROLES_EXTENSION, P as ScimPatchOp, R as isDirectoryUniquenessError, S as DirectoryUniquenessError, T as GROUP_SCHEMA, _ as DirectoryChange, a as normalizePatchOps, b as DirectoryNotFoundError, c as filterSupported, d as resourceTypes, f as schemas, g as APP_DATA_EXTENSION, h as sha256Hex, i as directoryMembershipSource, j as ScimHandlerOptions, k as SCIM_CONTENT_TYPE, l as matchFilter, m as authenticateScim, n as postgresDirectoryStore, o as tenantFromPath, p as serviceProviderConfig, r as memoryDirectoryStore, s as scimHandler, t as PostgresDirectoryStoreOptions, u as parseScimFilter, v as DirectoryGroup, w as ERROR_SCHEMA, x as DirectoryStore, y as DirectoryMembershipSourceOptions } from "../index-
|
|
2
|
+
import { A as ScimFilter, C as DirectoryUser, D as PATCH_SCHEMA, E as LIST_SCHEMA, F as ScimTokenOptions, I as USER_SCHEMA, L as isDirectoryNotFoundError, M as ScimPage, N as ScimPageResult, O as ROLES_EXTENSION, P as ScimPatchOp, R as isDirectoryUniquenessError, S as DirectoryUniquenessError, T as GROUP_SCHEMA, _ as DirectoryChange, a as normalizePatchOps, b as DirectoryNotFoundError, c as filterSupported, d as resourceTypes, f as schemas, g as APP_DATA_EXTENSION, h as sha256Hex, i as directoryMembershipSource, j as ScimHandlerOptions, k as SCIM_CONTENT_TYPE, l as matchFilter, m as authenticateScim, n as postgresDirectoryStore, o as tenantFromPath, p as serviceProviderConfig, r as memoryDirectoryStore, s as scimHandler, t as PostgresDirectoryStoreOptions, u as parseScimFilter, v as DirectoryGroup, w as ERROR_SCHEMA, x as DirectoryStore, y as DirectoryMembershipSourceOptions } from "../index-Dj2qF9VC.js";
|
|
3
3
|
export { APP_DATA_EXTENSION, type DirectoryChange, type DirectoryGroup, type DirectoryMembershipSourceOptions, DirectoryNotFoundError, type DirectoryStore, DirectoryUniquenessError, type DirectoryUser, ERROR_SCHEMA, GROUP_SCHEMA, LIST_SCHEMA, PATCH_SCHEMA, type PostgresDirectoryStoreOptions, ROLES_EXTENSION, SCIM_CONTENT_TYPE, type ScimFilter, type ScimHandlerOptions, type ScimPage, type ScimPageResult, type ScimPatchOp, type ScimTokenOptions, type SqlQuery, USER_SCHEMA, authenticateScim, directoryMembershipSource, filterSupported, isDirectoryNotFoundError, isDirectoryUniquenessError, matchFilter, memoryDirectoryStore, normalizePatchOps, parseScimFilter, postgresDirectoryStore, resourceTypes, schemas, scimHandler, serviceProviderConfig, sha256Hex, tenantFromPath };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { n as PermDockValidationError, t as PROBLEM_BASE } from "../validation-error-
|
|
2
|
-
import { i as PermDockRevokedError, n as PermDockApprovalRequiredError, r as PermDockDeniedError, t as ApprovalHint } from "../errors-
|
|
1
|
+
import { n as PermDockValidationError, t as PROBLEM_BASE } from "../validation-error-uvp-kyfO.js";
|
|
2
|
+
import { i as PermDockRevokedError, n as PermDockApprovalRequiredError, r as PermDockDeniedError, t as ApprovalHint } from "../errors-BIM4MFsJ.js";
|
|
3
3
|
import { t as RequestContext } from "../request-context-C2_1lchh.js";
|
|
4
4
|
import { i as memoryRevocationFeed, n as RevocationFeed, t as RevocationEvent } from "../revocations-BaUXHM1N.js";
|
|
5
|
-
import { C as TenantScope, D as ConnectionOptions, E as ConnectionData, S as TenantOption, T as Connection, _ as WebBotAuthVerifier, a as OperationScopes, b as invalidSignatureResponse, c as ServerPermDock, d as DiscoverViaSignatureAgentOptions, f as InvalidSignatureError, g as WebBotAuthOptions, h as WebBotAuthKeys, i as OpenApiHooks, l as ServerPermDockOptions, m as WebBotAuthKeyLookup, n as DeniedResponseEvent, o as ProtectOptions, p as WebBotAuthJwk, r as Guard, s as ScopeGuard, t as DeniedResponse, u as SnapshotQuery, v as discoverViaSignatureAgent, w as tenantScope, x as webBotAuthVerifier, y as invalidSignatureProblem } from "../server-types-
|
|
6
|
-
import { i as evaluationsHandler } from "../evaluations-
|
|
7
|
-
import { C as subjectFromApiKey, E as createPermDock, S as parseFeedKey, T as problemFromError, _ as generateApiKey, a as SupportSessionContext, b as memoryCredentialStore, c as SupportSessionSubjectOptions, d as ApiKeyFailureCause, f as ApiKeyParts, g as apiKeyVerifier, h as StoredCredential, i as wwwAuthenticate, l as signSupportSession, m as MemoryCredentialStore, n as problemResponse, o as SupportSessionFailureCause, p as ApiKeySubjectOptions, r as validationProblem, s as SupportSessionSource, t as problemFromDecision, u as subjectFromSupportSession, v as generateFeedKey, w as ProblemFromErrorOptions, x as parseApiKey, y as hashApiKey } from "../index-
|
|
8
|
-
import { l as ReplayStore } from "../types-
|
|
9
|
-
import { a as WebhookInput, c as WebhookMessage, d as WebhookSigningKey, f as WebhookVerifier, h as webhookVerifier, i as WebhookHeaders, l as WebhookSigner, m as webhookSigner, n as WebhookAlgorithm, o as WebhookJwk, p as WebhookVerifierOptions, r as WebhookFailureCause, s as WebhookJwks, t as VerifiedWebhookMessage, u as WebhookSignerOptions } from "../standard-webhooks-
|
|
10
|
-
import { t as memoryReplayStore } from "../replay-
|
|
11
|
-
import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotTag, r as SnapshotHeadersOptions, t as CacheLifeForOptions } from "../snapshot-cache-
|
|
12
|
-
import { a as RunContext, c as
|
|
13
|
-
export { type ApiKeyFailureCause, type ApiKeyParts, type ApiKeySubjectOptions, type ApprovalHint, type CacheLifeForOptions, type Connection, type ConnectionData, type ConnectionOptions, type DeniedResponse, type DeniedResponseEvent, type DiscoverViaSignatureAgentOptions, type Guard, InvalidSignatureError, type MemoryCredentialStore, type OpenApiHooks, type OperationScopes, PROBLEM_BASE, PermDockApprovalRequiredError, PermDockDeniedError, PermDockRevokedError, PermDockValidationError, type ProblemFromErrorOptions, type ProtectOptions, RUN_TICKET_CLAIMS, type ReplayStore, type RequestContext, type RevocationEvent, type RevocationFeed, type RunActClaim, type RunAutomation, type RunBinding, type RunContext, type RunKind, type RunPrincipal, type RunTicket, type RunTicketAutomations, type RunTicketFailureCause, type RunTicketInput, type RunTicketOptions, type RunTicketSubjectOptions, type ScopeGuard, type ServerPermDock, type ServerPermDockOptions, type SnapshotHeaders, type SnapshotHeadersOptions, type SnapshotQuery, type StoredCredential, type SupportSessionContext, type SupportSessionFailureCause, type SupportSessionSource, type SupportSessionSubjectOptions, type TenantOption, type TenantScope, type VerifiedWebhookMessage, type WebBotAuthJwk, type WebBotAuthKeyLookup, type WebBotAuthKeys, type WebBotAuthOptions, type WebBotAuthVerifier, type WebhookAlgorithm, type WebhookFailureCause, type WebhookHeaders, type WebhookInput, type WebhookJwk, type WebhookJwks, type WebhookMessage, type WebhookSigner, type WebhookSignerOptions, type WebhookSigningKey, type WebhookVerifier, type WebhookVerifierOptions, apiKeyVerifier, cacheLifeFor, createPermDock, discoverViaSignatureAgent, evaluationsHandler, generateApiKey, generateFeedKey, hashApiKey, invalidSignatureProblem, invalidSignatureResponse, memoryCredentialStore, memoryReplayStore, memoryRevocationFeed, parseApiKey, parseFeedKey, parseRunTicket, problemFromDecision, problemFromError, problemResponse, signRunTicket, signSupportSession, snapshotHeaders, snapshotTag, subjectFromApiKey, subjectFromRunTicket, subjectFromSupportSession, tenantScope, validationProblem, webBotAuthVerifier, webhookSigner, webhookVerifier, wwwAuthenticate };
|
|
5
|
+
import { C as TenantScope, D as ConnectionOptions, E as ConnectionData, S as TenantOption, T as Connection, _ as WebBotAuthVerifier, a as OperationScopes, b as invalidSignatureResponse, c as ServerPermDock, d as DiscoverViaSignatureAgentOptions, f as InvalidSignatureError, g as WebBotAuthOptions, h as WebBotAuthKeys, i as OpenApiHooks, l as ServerPermDockOptions, m as WebBotAuthKeyLookup, n as DeniedResponseEvent, o as ProtectOptions, p as WebBotAuthJwk, r as Guard, s as ScopeGuard, t as DeniedResponse, u as SnapshotQuery, v as discoverViaSignatureAgent, w as tenantScope, x as webBotAuthVerifier, y as invalidSignatureProblem } from "../server-types-CyRN0-Cd.js";
|
|
6
|
+
import { i as evaluationsHandler } from "../evaluations-DOWuBpWv.js";
|
|
7
|
+
import { C as subjectFromApiKey, E as createPermDock, S as parseFeedKey, T as problemFromError, _ as generateApiKey, a as SupportSessionContext, b as memoryCredentialStore, c as SupportSessionSubjectOptions, d as ApiKeyFailureCause, f as ApiKeyParts, g as apiKeyVerifier, h as StoredCredential, i as wwwAuthenticate, l as signSupportSession, m as MemoryCredentialStore, n as problemResponse, o as SupportSessionFailureCause, p as ApiKeySubjectOptions, r as validationProblem, s as SupportSessionSource, t as problemFromDecision, u as subjectFromSupportSession, v as generateFeedKey, w as ProblemFromErrorOptions, x as parseApiKey, y as hashApiKey } from "../index-CV-7DWeD.js";
|
|
8
|
+
import { l as ReplayStore } from "../types-DsHGPtkR.js";
|
|
9
|
+
import { a as WebhookInput, c as WebhookMessage, d as WebhookSigningKey, f as WebhookVerifier, h as webhookVerifier, i as WebhookHeaders, l as WebhookSigner, m as webhookSigner, n as WebhookAlgorithm, o as WebhookJwk, p as WebhookVerifierOptions, r as WebhookFailureCause, s as WebhookJwks, t as VerifiedWebhookMessage, u as WebhookSignerOptions } from "../standard-webhooks-DOYEuOLx.js";
|
|
10
|
+
import { t as memoryReplayStore } from "../replay-Bs9Df2fQ.js";
|
|
11
|
+
import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotTag, r as SnapshotHeadersOptions, t as CacheLifeForOptions } from "../snapshot-cache-BjAWkchD.js";
|
|
12
|
+
import { _ as subjectFromRunTicket, a as RunContext, c as RunResource, d as RunTicketFailureCause, f as RunTicketInput, g as signRunTicket, h as parseRunTicket, i as RunBinding, l as RunTicket, m as RunTicketSubjectOptions, n as RunActClaim, o as RunKind, p as RunTicketOptions, r as RunAutomation, s as RunPrincipal, t as RUN_TICKET_CLAIMS, u as RunTicketAutomations } from "../run-ticket-ylovhyFQ.js";
|
|
13
|
+
export { type ApiKeyFailureCause, type ApiKeyParts, type ApiKeySubjectOptions, type ApprovalHint, type CacheLifeForOptions, type Connection, type ConnectionData, type ConnectionOptions, type DeniedResponse, type DeniedResponseEvent, type DiscoverViaSignatureAgentOptions, type Guard, InvalidSignatureError, type MemoryCredentialStore, type OpenApiHooks, type OperationScopes, PROBLEM_BASE, PermDockApprovalRequiredError, PermDockDeniedError, PermDockRevokedError, PermDockValidationError, type ProblemFromErrorOptions, type ProtectOptions, RUN_TICKET_CLAIMS, type ReplayStore, type RequestContext, type RevocationEvent, type RevocationFeed, type RunActClaim, type RunAutomation, type RunBinding, type RunContext, type RunKind, type RunPrincipal, type RunResource, type RunTicket, type RunTicketAutomations, type RunTicketFailureCause, type RunTicketInput, type RunTicketOptions, type RunTicketSubjectOptions, type ScopeGuard, type ServerPermDock, type ServerPermDockOptions, type SnapshotHeaders, type SnapshotHeadersOptions, type SnapshotQuery, type StoredCredential, type SupportSessionContext, type SupportSessionFailureCause, type SupportSessionSource, type SupportSessionSubjectOptions, type TenantOption, type TenantScope, type VerifiedWebhookMessage, type WebBotAuthJwk, type WebBotAuthKeyLookup, type WebBotAuthKeys, type WebBotAuthOptions, type WebBotAuthVerifier, type WebhookAlgorithm, type WebhookFailureCause, type WebhookHeaders, type WebhookInput, type WebhookJwk, type WebhookJwks, type WebhookMessage, type WebhookSigner, type WebhookSignerOptions, type WebhookSigningKey, type WebhookVerifier, type WebhookVerifierOptions, apiKeyVerifier, cacheLifeFor, createPermDock, discoverViaSignatureAgent, evaluationsHandler, generateApiKey, generateFeedKey, hashApiKey, invalidSignatureProblem, invalidSignatureResponse, memoryCredentialStore, memoryReplayStore, memoryRevocationFeed, parseApiKey, parseFeedKey, parseRunTicket, problemFromDecision, problemFromError, problemResponse, signRunTicket, signSupportSession, snapshotHeaders, snapshotTag, subjectFromApiKey, subjectFromRunTicket, subjectFromSupportSession, tenantScope, validationProblem, webBotAuthVerifier, webhookSigner, webhookVerifier, wwwAuthenticate };
|
package/dist/server/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import { t as memoryReplayStore } from "../replay-BU09ad4L.js";
|
|
|
6
6
|
import { n as snapshotHeaders, r as snapshotTag, t as cacheLifeFor } from "../snapshot-cache-Bx_4xC_6.js";
|
|
7
7
|
import { d as invalidSignatureProblem, f as invalidSignatureResponse, l as InvalidSignatureError, o as evaluationsHandler, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-IBceAeKT.js";
|
|
8
8
|
import { n as tenantScope } from "../adapter-context-CIQpQxbE.js";
|
|
9
|
-
import { t as createPermDock } from "../create-
|
|
9
|
+
import { t as createPermDock } from "../create-BLPKnJKa.js";
|
|
10
10
|
import { a as generateFeedKey, c as parseApiKey, i as generateApiKey, l as parseFeedKey, n as subjectFromSupportSession, o as hashApiKey, r as apiKeyVerifier, s as memoryCredentialStore, t as signSupportSession, u as subjectFromApiKey } from "../server-3cVlTLde.js";
|
|
11
|
-
import { i as subjectFromRunTicket, n as parseRunTicket, r as signRunTicket, t as RUN_TICKET_CLAIMS } from "../run-ticket-
|
|
11
|
+
import { i as subjectFromRunTicket, n as parseRunTicket, r as signRunTicket, t as RUN_TICKET_CLAIMS } from "../run-ticket-DfnZCh-u.js";
|
|
12
12
|
import { t as problemFromError } from "../map-error-pasIGqMT.js";
|
|
13
13
|
import { n as webhookVerifier, t as webhookSigner } from "../standard-webhooks-D67a3nzk.js";
|
|
14
14
|
export { InvalidSignatureError, PROBLEM_BASE, PermDockApprovalRequiredError, PermDockDeniedError, PermDockRevokedError, PermDockValidationError, RUN_TICKET_CLAIMS, apiKeyVerifier, cacheLifeFor, createPermDock, discoverViaSignatureAgent, evaluationsHandler, generateApiKey, generateFeedKey, hashApiKey, invalidSignatureProblem, invalidSignatureResponse, memoryCredentialStore, memoryReplayStore, memoryRevocationFeed, parseApiKey, parseFeedKey, parseRunTicket, problemFromDecision, problemFromError, problemResponse, signRunTicket, signSupportSession, snapshotHeaders, snapshotTag, subjectFromApiKey, subjectFromRunTicket, subjectFromSupportSession, tenantScope, validationProblem, webBotAuthVerifier, webhookSigner, webhookVerifier, wwwAuthenticate };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Un as Decision, Wt as Instant, X as Intent, Zt as Snapshot, dr as JsonWebKeyLike, hr as Subject, j as PolicyVocabulary, rr as Actor } from "./policy-types-DGIO_gxq.js";
|
|
2
2
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock, u as SnapshotOptions } 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, u as SnapshotOptions } from "./permdock-CprAPN3w.js";
|
|
4
|
+
import { m as ApprovalStore } from "./types-DLvhVm1r.js";
|
|
5
|
+
import { a as ProblemDetails, t as ApprovalHint } from "./errors-BIM4MFsJ.js";
|
|
6
|
+
import { t as InstanceOptions } from "./instance-options-CoHn-0e8.js";
|
|
7
7
|
import { t as RequestContext } from "./request-context-C2_1lchh.js";
|
|
8
|
-
import { n as PermDockWrap } from "./wrap-
|
|
8
|
+
import { n as PermDockWrap } from "./wrap-DxXB54Wu.js";
|
|
9
9
|
import { n as RevocationFeed } from "./revocations-BaUXHM1N.js";
|
|
10
|
-
import { r as PdpFactory } from "./types-
|
|
11
|
-
import { i as evaluationsHandler } from "./evaluations-
|
|
10
|
+
import { r as PdpFactory } from "./types-DlelvQk4.js";
|
|
11
|
+
import { i as evaluationsHandler } from "./evaluations-DOWuBpWv.js";
|
|
12
12
|
//#region src/server/connection.d.ts
|
|
13
13
|
type ConnectionData<T> = T | (() => T | null | undefined | Promise<T | null | undefined>);
|
|
14
14
|
type ConnectionOptions<T = unknown> = {
|
|
@@ -151,6 +151,13 @@ type ServerPermDockOptions<TUser = unknown> = InstanceOptions & {
|
|
|
151
151
|
* cover derived instances.
|
|
152
152
|
*/
|
|
153
153
|
readonly wrap?: PermDockWrap;
|
|
154
|
+
/**
|
|
155
|
+
* `'read'` lets `claimsFirst(…, { versions })` judge the token from the
|
|
156
|
+
* shared version cache. Defaults to `'read'` for `GET`, `HEAD` and `OPTIONS`
|
|
157
|
+
* and `'write'` for every other method. `undefined` keeps the default; a
|
|
158
|
+
* throw or any other value is `'write'`.
|
|
159
|
+
*/
|
|
160
|
+
readonly intent?: (request: Request) => Intent | undefined;
|
|
154
161
|
/**
|
|
155
162
|
* The `adapter` label on decision events, revocations and approvals. Defaults
|
|
156
163
|
* to `server`.
|
|
@@ -4,7 +4,7 @@ import { t as byCodePoint } from "./compare-DTfyUunF.js";
|
|
|
4
4
|
import { i as configError } from "./errors-Vpu6rKHl.js";
|
|
5
5
|
import { a as quoteQualifiedTable, c as quoteSqlTable, o as quoteSqlIdent, s as quoteSqlLiteral, t as SQL_IDENT } from "./sql-0WjxIp9g.js";
|
|
6
6
|
import { t as byScope } from "./compile-EzEMB-7v.js";
|
|
7
|
-
import "./sources-
|
|
7
|
+
import "./sources-C4vkzZJV.js";
|
|
8
8
|
//#region src/cli/sql/columns.ts
|
|
9
9
|
/**
|
|
10
10
|
* The Postgres type a JSON Schema property compares as; `undefined` for text or
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as DecisionSink, St as SupportSession, an as CredentialEvent, fn as MembershipEvent, in as AutomationEvent, kt as Credential, mt as TokenSigner, nn as AccessEvent, pn as SinkEvent } from "./policy-types-DGIO_gxq.js";
|
|
2
2
|
import { M as AppData } from "./permission-types-CAY-GU7e.js";
|
|
3
3
|
import { u as OperationRisk } from "./operations-Ci_rT6Uo.js";
|
|
4
|
-
import { t as Automation } from "./automation-
|
|
4
|
+
import { t as Automation } from "./automation-C6Jg75xq.js";
|
|
5
5
|
//#region src/core/sink.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* The closed list of CloudEvents `type` values, `com.permdock.<family>` or
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-L8EstFNm.js";
|
|
2
2
|
import { t as checkFlag } from "./flags-DXjoTVbS.js";
|
|
3
3
|
import { r as pick, t as CANCELLED } from "./prompt-BYc6drYW.js";
|
|
4
|
-
import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-
|
|
4
|
+
import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-iwbRxavw.js";
|
|
5
5
|
//#region src/cli/commands/skills.ts
|
|
6
6
|
const forFlag = { for: {
|
|
7
7
|
type: "string",
|
|
@@ -2,7 +2,7 @@ import { t as byCodePoint } from "./compare-DTfyUunF.js";
|
|
|
2
2
|
import { i as readJsonFile } from "./files-BSjrtIHw.js";
|
|
3
3
|
import { l as packageRoot } from "./version-DMQ0dnN5.js";
|
|
4
4
|
import { t as didYouMean } from "./args-0FrVs5EH.js";
|
|
5
|
-
import { a as nonEmptyOr } from "./output-
|
|
5
|
+
import { a as nonEmptyOr } from "./output-LsbLe41I.js";
|
|
6
6
|
import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hn as ApprovalRequiredDecision, Un as Decision, Yn as GrantedDecision, Zt as Snapshot, fr as Membership, ht as TokenVerifier, j as PolicyVocabulary } from "../policy-types-DGIO_gxq.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
3
|
import { r as Role } from "../vocabulary-DEJ5j4mR.js";
|
|
4
|
-
import { d as UncheckedData, s as RowData } from "../permdock-
|
|
5
|
-
import { c as requiredPlans } from "../errors-
|
|
6
|
-
import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-
|
|
4
|
+
import { d as UncheckedData, s as RowData } from "../permdock-CprAPN3w.js";
|
|
5
|
+
import { c as requiredPlans } from "../errors-BIM4MFsJ.js";
|
|
6
|
+
import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-BbFPBSms.js";
|
|
7
7
|
import { t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
8
|
-
import { n as ProtectedAction, t as ActionResult } from "../action-result-
|
|
8
|
+
import { n as ProtectedAction, t as ActionResult } from "../action-result-BcudBQOF.js";
|
|
9
9
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
10
|
-
import { a as FilterResult, b as eventSourceRefresh, c as PermissionSet, d as ProtectedActionView, f as ProviderOptionsBase, h as TenantView, i as ClientStatus, l as PermissionState, m as SubjectView, n as ApprovalState, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, v as EventSourceRefreshOptions, y as RefreshTrigger } from "../types-
|
|
10
|
+
import { a as FilterResult, b as eventSourceRefresh, c as PermissionSet, d as ProtectedActionView, f as ProviderOptionsBase, h as TenantView, i as ClientStatus, l as PermissionState, m as SubjectView, n as ApprovalState, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle, v as EventSourceRefreshOptions, y as RefreshTrigger } from "../types-tQB2CEnY.js";
|
|
11
11
|
import { Accessor, Accessor as Accessor$1, JSX } from "solid-js";
|
|
12
12
|
//#region src/solid/types.d.ts
|
|
13
13
|
/** Structural `JSX.Element`: text, a DOM node or a list of children. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as Policy, Zt as Snapshot, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.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-CprAPN3w.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-CyRN0-Cd.js";
|
|
6
|
+
import { a as ProtectTarget, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-BIbBAtPZ.js";
|
|
7
7
|
import { APIEvent, FetchEvent } from "@solidjs/start/server";
|
|
8
8
|
//#region src/solid-start/create.d.ts
|
|
9
9
|
/** The h3 event under every SolidStart request; `subject` and `scope` read it. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-IBceAeKT.js";
|
|
2
|
-
import { i as decorate } from "../bind-
|
|
3
|
-
import { n as guardedRoute, t as fetchAdapter } from "../fetch-adapter-
|
|
2
|
+
import { i as decorate } from "../bind-BNQA9JK9.js";
|
|
3
|
+
import { n as guardedRoute, t as fetchAdapter } from "../fetch-adapter-dPTgJVHd.js";
|
|
4
4
|
//#region src/solid-start/create.ts
|
|
5
5
|
/**
|
|
6
6
|
* `event.locals`. Its type, `App.RequestEventLocals`, is declared by
|
|
@@ -228,7 +228,7 @@ function singleRole(role, table, alias, options) {
|
|
|
228
228
|
}
|
|
229
229
|
const pairs = Object.entries(role.on);
|
|
230
230
|
const [pair] = pairs;
|
|
231
|
-
if (pair === void 0 || pairs.length !== 1) throw new TypeError(`${prefix}: ${options.label}.on must map exactly one column of ${table} to ${role.through}, for example ${options.example ?? "{ role_id: 'id' }"}`);
|
|
231
|
+
if (pair === void 0 || pairs.length !== 1 && options.composite !== true) throw new TypeError(options.composite === true ? `${prefix}: ${options.label}.on must map at least one column of ${table} to ${role.through}, for example ${options.example ?? "{ role_id: 'id' }"}` : `${prefix}: ${options.label}.on must map exactly one column of ${table} to ${role.through}, for example ${options.example ?? "{ role_id: 'id' }"}`);
|
|
232
232
|
const [ref, id] = pair;
|
|
233
233
|
const schema = table.includes(".") ? table.split(".")[0] ?? "public" : "public";
|
|
234
234
|
const through = role.through.includes(".") ? role.through : `${schema}.${role.through}`;
|
|
@@ -238,18 +238,20 @@ function singleRole(role, table, alias, options) {
|
|
|
238
238
|
table: through,
|
|
239
239
|
id,
|
|
240
240
|
key: role.column,
|
|
241
|
-
ref
|
|
241
|
+
ref,
|
|
242
|
+
match: pairs
|
|
242
243
|
};
|
|
244
|
+
const on = pairs.map(([from, to]) => `${keys}.${q(to)} = ${alias}.${q(from)}`).join(" and ");
|
|
243
245
|
const plain = `${keys}.${q(role.column)}::text`;
|
|
244
246
|
const guard = options.guard;
|
|
245
247
|
const key = guard !== void 0 && qualifySqlTable(guard.table) === through ? `case when ${keys}.${q(guard.tenant)} is not null${guard.skip === void 0 ? "" : ` and not coalesce(${keys}.${q(guard.skip)}, false)`} and ${plain} = any(${sqlTextArray(guard.declared)}) then null else ${plain} end` : plain;
|
|
246
248
|
return {
|
|
247
249
|
column: ref,
|
|
248
250
|
sql: key,
|
|
249
|
-
join: `${options.indent === void 0 ? " " : `\n${options.indent}`}join ${target} ${keys} on ${
|
|
250
|
-
lookup: `(select ${key} from ${target} ${keys} where ${
|
|
251
|
+
join: `${options.indent === void 0 ? " " : `\n${options.indent}`}join ${target} ${keys} on ${on}`,
|
|
252
|
+
lookup: `(select ${key} from ${target} ${keys} where ${on})`,
|
|
251
253
|
through: keyed,
|
|
252
|
-
columns: [
|
|
254
|
+
columns: pairs.map(([from]) => from),
|
|
253
255
|
throughs: [keyed],
|
|
254
256
|
lateral: false,
|
|
255
257
|
nullable: false
|
|
@@ -264,12 +266,14 @@ function sourceManifest(column, through, map) {
|
|
|
264
266
|
column,
|
|
265
267
|
map
|
|
266
268
|
};
|
|
267
|
-
|
|
269
|
+
if (through === void 0) return { column };
|
|
270
|
+
return {
|
|
268
271
|
column,
|
|
269
272
|
through: {
|
|
270
273
|
table: through.table,
|
|
271
274
|
id: through.id,
|
|
272
|
-
column: through.key
|
|
275
|
+
column: through.key,
|
|
276
|
+
...through.match.length > 1 ? { on: Object.fromEntries(through.match) } : {}
|
|
273
277
|
}
|
|
274
278
|
};
|
|
275
279
|
}
|
|
@@ -300,6 +304,7 @@ function memberRole(role, table, label, guard) {
|
|
|
300
304
|
return roleColumn(role, qualifySqlTable(table), "m", {
|
|
301
305
|
label,
|
|
302
306
|
indent: "",
|
|
307
|
+
composite: true,
|
|
303
308
|
...guard === void 0 ? {} : { guard }
|
|
304
309
|
});
|
|
305
310
|
}
|