permdock 0.3.0 → 0.4.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 +7 -5
- package/dist/a2a/index.js +14 -21
- package/dist/ai-sdk/index.d.ts +18 -6
- package/dist/ai-sdk/index.js +8 -5
- package/dist/app-data-CV8pqqMi.js +59 -0
- package/dist/approvals/index.d.ts +2 -2
- package/dist/approvals/index.js +3 -3
- package/dist/{approvals-DbYAuNkG.js → approvals-DZL76lKW.js} +35 -19
- package/dist/{approvers-DT4AVyIg.js → approvers-CqPOLD-o.js} +1 -1
- package/dist/{arazzo-BAgw9ap6.js → arazzo-C4BcskbX.js} +6 -5
- package/dist/{arazzo-CKwwqFWz.js → arazzo-CD8d0WLb.js} +2 -2
- package/dist/authzen/index.d.ts +3 -3
- package/dist/authzen/index.js +161 -23
- package/dist/better-auth/index.d.ts +2 -2
- package/dist/better-auth/index.js +6 -19
- package/dist/better-supabase/index.d.ts +112 -87
- package/dist/better-supabase/index.js +257 -156
- package/dist/{bind-C_ob3LKa.d.ts → bind-BzqG8SMb.d.ts} +16 -5
- package/dist/{bind-CuzGytRf.js → bind-kk-uyCwH.js} +14 -6
- package/dist/build-instance-DIIV9DbC.js +51 -0
- package/dist/{canonical-json-DemiK4Vp.js → canonical-json-CFKyFOke.js} +1 -3
- package/dist/{capability-2kYTMWDv.d.ts → capability-CksyCWDH.d.ts} +2 -2
- package/dist/{capability-4qPdO9gk.js → capability-txATtKV4.js} +3 -2
- package/dist/catalog/index.d.ts +1 -1
- package/dist/catalog/index.js +1 -1
- package/dist/catalog-6yWAX6Ps.js +2 -0
- package/dist/{catalog-dFZdWCGN.js → catalog-WHG4kBq7.js} +2 -2
- package/dist/{catalog-doc-DdGm82XT.js → catalog-doc-DWtg0gGR.js} +17 -10
- package/dist/{catalog-DWF5cYqB.js → catalog-tZUyOfOv.js} +4 -4
- package/dist/claude-agent/index.d.ts +4 -4
- package/dist/claude-agent/index.js +4 -5
- package/dist/clerk/index.d.ts +3 -3
- package/dist/clerk/index.js +8 -33
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +3 -3
- package/dist/cloud/index.d.ts +4 -4
- package/dist/cloud/index.js +9 -15
- package/dist/{cloud-CB_ELYuX.js → cloud-C7bSDgX4.js} +2 -2
- package/dist/{cloud-DWLXO2af.js → cloud-PeBN3IEn.js} +5 -5
- package/dist/{collect-DSTE3ml9.js → collect-2SrB7lfk.js} +6 -8
- package/dist/collect-Bw2Jdq1q.js +2 -0
- package/dist/{collect-DClJsheJ.js → collect-CQx4hX4N.js} +3 -3
- package/dist/{commands-DSxCqG9A.js → commands-Cpip4ULx.js} +13 -13
- package/dist/{compact-y6vfu2_f.js → compact-CAf557ZB.js} +11 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/compile/index.js +1 -1
- package/dist/{compile-Ba4blROR.js → compile-CcEu2ZQ1.js} +6 -5
- package/dist/{compile-BkRyBDBw.d.ts → compile-CtTP7eur.d.ts} +2 -2
- package/dist/{config-BJiM-xAm.js → config-BIjREpyE.js} +4 -4
- package/dist/{config-Dnszbv-6.js → config-DLt6BvV7.js} +2 -2
- package/dist/{config-report-DMvWKUxL.js → config-report--Xb9APJS.js} +5 -6
- package/dist/{connection-CU8MQxRi.js → connection-DUsczpB5.js} +3 -2
- package/dist/constants-DcJABbLW.js +20 -0
- package/dist/{context-Bcy85rGi.js → context-DieZVJXu.js} +16 -5
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +14 -16
- package/dist/create-BBO24vj6.js +324 -0
- package/dist/{credential-8P81ff4u.js → credential-kue0qpbm.js} +4 -4
- package/dist/deciding-columns-Sq12mEA6.js +123 -0
- package/dist/delegation-input-FTxMK3ji.js +19 -0
- package/dist/denied-text-DfRk15uw.d.ts +19 -0
- package/dist/{describe-DMYiCjJV.d.ts → describe-C3ldA9os.d.ts} +11 -2
- package/dist/{describe-B_gVZEVi.js → describe-Cgkp7eP0.js} +5 -4
- package/dist/{diff-DBIhz_f2.js → diff-Cnghh_Ip.js} +2 -2
- package/dist/{diff-2VaeChzX.js → diff-rpqoe7Ag.js} +9 -9
- package/dist/{doctor-BwCAMLx_.js → doctor-CuVJvhV_.js} +2 -2
- package/dist/doctor-owlv6ddh.js +2166 -0
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/drizzle/index.js +6 -14
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +7 -7
- package/dist/{errors-DPdqI50v.d.ts → errors-OD_4c__H.d.ts} +2 -2
- package/dist/{errors-Cz5zn0mW.js → errors-drnfxYtm.js} +3 -3
- package/dist/{evaluations-tz6D9A2G.js → evaluations-C9YJsv3H.js} +45 -7
- package/dist/eve/index.d.ts +5 -5
- package/dist/eve/index.js +5 -5
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +8 -7
- package/dist/fastify/index.d.ts +15 -5
- package/dist/fastify/index.js +9 -29
- package/dist/fields-fwfXN01n.js +1016 -0
- package/dist/{files-DWUN9PzI.js → files-D_JIzUrP.js} +12 -3
- package/dist/{fixtures-ht28Cplr.js → fixtures-h2eG2OZV.js} +5 -6
- package/dist/{from-snapshot-CTLijvdm.js → from-snapshot-7REQZe0H.js} +32 -22
- package/dist/{generate-CH7ThJ14.js → generate-CNU1pIOo.js} +1 -3
- package/dist/grantee-CXY-0C87.js +254 -0
- package/dist/grantee-conditions-MQs5NIuX.js +270 -0
- package/dist/grantee-match-fxYp9Nmt.js +141 -0
- package/dist/{helpers-H_KARDVC.js → helpers-C9YmyBIa.js} +7 -6
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +8 -8
- package/dist/hosted-CBHgkzDl.js +655 -0
- package/dist/{http-SO7qGttf.js → http-BBoKefeS.js} +35 -2
- package/dist/{http-BIhmLfCc.js → http-BEbdMZ05.js} +2 -24
- package/dist/{rls-import-BTFVk3jH.js → import-BFIlhetD.js} +86 -80
- package/dist/{openapi-import-cmwetbzw.js → import-UHk1N7vH.js} +6 -7
- package/dist/{index-C8z4RjQV.d.ts → index-BwMe94Xq.d.ts} +1 -1
- package/dist/{index-0nNqHspG.d.ts → index-DgM7w96K.d.ts} +2 -2
- package/dist/{index-C7Tw7MaW.d.ts → index-Dz7didpC.d.ts} +3 -3
- package/dist/{index-BNc7Wer_.d.ts → index-UdVQgq48.d.ts} +105 -38
- package/dist/index.d.ts +15 -13
- package/dist/index.js +22 -22
- package/dist/{instance-options-jARdwfPN.d.ts → instance-options-plkrsAog.d.ts} +1 -1
- package/dist/{json-schema-BsAflUGW.js → json-schema-DBkdUuCO.js} +1 -3
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +13 -13
- package/dist/{kernel-_RRHmnMY.js → kernel-CB3LrIJM.js} +81 -32
- package/dist/kysely/index.d.ts +2 -2
- package/dist/kysely/index.js +6 -14
- package/dist/{live-options-H2eG8dfJ.js → live-options-BaAFCIiu.js} +16 -3
- package/dist/load-B_shHrmd.js +2 -0
- package/dist/{load-DhWEB9P1.js → load-C3_oTHyO.js} +11 -3
- package/dist/{manifest-iaoBXHKc.js → manifest-BngWKryL.js} +5 -18
- package/dist/{map-claims-Z4QZOiFF.js → map-claims-AVlBaJoa.js} +7 -16
- package/dist/{map-error-pgUWNNtG.js → map-error-BE27PYkE.js} +5 -5
- package/dist/{markers-B0hYLvMD.js → markers-CiwAOZtO.js} +6 -2
- package/dist/{may-use-DndQ5tQ-.js → may-use-BOn_dR_w.js} +4 -3
- package/dist/mcp/index.d.ts +26 -9
- package/dist/mcp/index.js +456 -446
- package/dist/{rls-migrate-CN4TlJTO.js → migrate-BwlB5-Wk.js} +75 -15
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +11 -12
- package/dist/next/index.d.ts +31 -8
- package/dist/next/index.js +29 -33
- 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 +4 -4
- package/dist/ocsf-uYFXGVw2.js +115 -0
- package/dist/openai/index.d.ts +5 -5
- package/dist/openai/index.js +4 -4
- package/dist/openapi/index.d.ts +3 -3
- package/dist/openapi/index.js +1 -1
- package/dist/{openapi-CqqEbHsL.js → openapi-BJdBmYDG.js} +19 -23
- package/dist/{openapi-BqRBvAng.js → openapi-DBzHQbov.js} +2 -5
- package/dist/{openapi-l0xYHkcv.js → openapi-DcQ1Kg40.js} +3 -3
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +9 -11
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +26 -23
- package/dist/output-files-CgIsvdSa.js +140 -0
- package/dist/{rls-ownership-RuFqaqGz.js → ownership-BgnbOJFT.js} +387 -379
- package/dist/{package-root-zGkxO3oN.js → package-root-DtNnpmUd.js} +3 -2
- package/dist/{parse-BuyjxhZV.js → parse-CVFQHk6c.js} +3 -3
- package/dist/{parse-local-manifest-BrMozJCo.js → parse-local-manifest-C-q02Pal.js} +2 -4
- package/dist/{parse-local-manifest-JLnaBH0S.d.ts → parse-local-manifest-DvYUR0QL.d.ts} +1 -1
- package/dist/pdp/index.d.ts +2 -2
- package/dist/pdp/index.js +8 -9
- package/dist/{permdock-CbgvLnuo.js → permdock-L26udHSk.js} +1387 -1220
- package/dist/{rls-fields-74oZPXWL.js → permission-keys-B26jeyUv.js} +1289 -2066
- package/dist/permission-registry-BsblpB-z.js +385 -0
- package/dist/{permissions-DttnqqxC.d.ts → permission-types-Dg39z9Kv.d.ts} +59 -31
- package/dist/{permissions-RJrovw98.js → permissions-CCJ6lmxB.js} +3 -3
- package/dist/{permissions-CDgvKG5L.d.ts → permissions-COH-KRgT.d.ts} +2 -2
- package/dist/{policy-IB6yxpC3.d.ts → policy-types-sp9P1iIV.d.ts} +661 -582
- package/dist/{policy-D2W7uv19.d.ts → policy-ur0BBK_e.d.ts} +2 -2
- package/dist/{powersync-DliZK_-y.js → powersync-BFSbSElQ.js} +2 -2
- package/dist/powersync-DCDgZgfZ.js +2 -0
- package/dist/{powersync-BylawD_U.js → powersync-cZe4kzhL.js} +26 -27
- package/dist/prisma/index.d.ts +1 -1
- package/dist/prisma/index.js +6 -12
- package/dist/{problem-B43ztKIm.js → problem-CnWraVhC.js} +8 -7
- package/dist/{problem-details-_AMOYz-w.js → problem-details-DECUnXAn.js} +2 -2
- package/dist/{problem-details-DX075l9V.d.ts → problem-details-rIIo8B2C.d.ts} +1 -1
- package/dist/{protected-BdnIEFkY.d.ts → protected-B3_P7xuw.d.ts} +9 -6
- package/dist/{protected-utU-SLuy.js → protected-BN7BUdY1.js} +20 -8
- package/dist/{provider-CSQd7m92.js → provider-Bi-0HNL3.js} +23 -10
- package/dist/{provider-DZY281jO.d.ts → provider-kwHC9CZD.d.ts} +1 -1
- package/dist/{provider-store-Cfbvo4DE.js → provider-store-Ctt-81Ni.js} +6 -3
- package/dist/react/index.d.ts +7 -7
- package/dist/react/index.js +5 -5
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +20 -11
- package/dist/react-native/index.js +33 -17
- package/dist/{refs-KYb4ntaz.js → refs-f3imMjNW.js} +1 -1
- package/dist/relation-walk-BXnlLtg2.js +186 -0
- package/dist/relations-CvmSpG67.js +163 -0
- package/dist/{replay-CYyiLiwO.d.ts → replay-COpmZUfx.d.ts} +1 -1
- package/dist/request-context-BVM7aWNs.js +71 -0
- package/dist/request-context-C2_1lchh.d.ts +5 -0
- package/dist/resource-relations-D1Un3pcz.js +243 -0
- package/dist/retire-BFcxL6un.js +240 -0
- package/dist/{rls-B4ur8nKQ.js → rls-55DQTuf5.js} +14 -2
- package/dist/{rls-DQtdgTHB.js → rls-BEktUaqg.js} +884 -484
- package/dist/{policy-xyWg7QdR.js → role-builder-B4GbKM-i.js} +235 -541
- package/dist/{rpc-DL9Sqvb1.js → rpc-nYC3cR_u.js} +15 -5
- package/dist/{run-DKDbM4Du.js → run-DMcNW_8T.js} +3 -3
- package/dist/{runtime-CB8gQFvS.js → runtime-D_tMXnsq.js} +1 -1
- package/dist/{saas-DhpJjnBA.js → saas-DtaA4JuW.js} +9 -8
- package/dist/{openapi-schema--ARjyfQr.js → schema-Bol6gqXA.js} +3 -5
- package/dist/{schema-D3MnDMxa.js → schema-DjQBcAP9.js} +4 -2
- package/dist/scim/index.d.ts +1 -1
- package/dist/scim/index.js +1 -1
- package/dist/{scim-BFGBBAqR.js → scim-vFR1O5oG.js} +6 -12
- package/dist/{scopes-CVdPrWN-.js → scopes-tvpa34ep.js} +10 -2
- package/dist/server/index.d.ts +18 -8
- package/dist/server/index.js +8 -8
- package/dist/{server-DlZ28Oz5.js → server-ZYEHtNHS.js} +4 -4
- package/dist/{create-B1d519XK.d.ts → server-types-DdqBwZN_.d.ts} +69 -33
- package/dist/shared-1uhI-e-b.js +294 -0
- package/dist/{shared-DRu8VFVM.js → shared-JhMeOsDF.js} +1 -1
- package/dist/{sink-Bd9PSyfq.js → sink-BTtmfPnE.js} +1 -1
- package/dist/{sink-B1fZzIMf.d.ts → sink-CPN4zLfs.d.ts} +1 -1
- package/dist/{skills-Biq5uup3.js → skills-BZdRQkxs.js} +4 -3
- package/dist/{skills-Bx-U0irG.js → skills-Dle4ZoLF.js} +2 -2
- package/dist/{snapshot-Enxd0n-s.js → snapshot-Dc9CHPME.js} +116 -13
- package/dist/{snapshot-cache-D6jLelln.js → snapshot-cache-Cod40D-X.js} +1 -1
- package/dist/{snapshot-cache-B-LxUahj.d.ts → snapshot-cache-J5T7t_vD.d.ts} +1 -1
- package/dist/solid/index.d.ts +22 -22
- package/dist/solid/index.js +40 -10
- package/dist/{sources-4p0-4xQm.js → sources-B1-b-R0t.js} +25 -26
- package/dist/{sources-BdOYLw9j.d.ts → sources-Dljy06zL.d.ts} +6 -2
- package/dist/{sql-xdg5f4Fi.js → sql-t8teWOfo.js} +19 -3
- package/dist/{src-BDwEZWrZ.js → src-Bb7no-hS.js} +194 -123
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +58 -61
- package/dist/store-9KO4BlkB.d.ts +147 -0
- package/dist/{store-DMAWwAJV.js → store-ILkLUj_o.js} +4 -4
- package/dist/{store-options-ByhZq1jV.js → store-options-CbUHDoSe.js} +16 -7
- package/dist/{stores-BT2pSCub.js → stores-BHXdSbw9.js} +7 -3
- package/dist/stores-Cxz_80g-.d.ts +31 -0
- package/dist/{stream-DDpvynSB.js → stream-BMui98KK.js} +2 -1
- package/dist/{stream-D1RXubw2.d.ts → stream-Dwsg6WwE.d.ts} +2 -2
- package/dist/{subject-settings-BwBmCdTR.js → subject-settings-CkEwrw3W.js} +23 -5
- package/dist/supabase/index.d.ts +4 -4
- package/dist/supabase/index.js +3 -3
- package/dist/supabase/middleware.d.ts +11 -5
- package/dist/supabase/middleware.js +10 -7
- package/dist/{supabase-C0qESOa-.js → supabase-C1TWlnYt.js} +36 -52
- package/dist/{supabase-Boqb9a_Y.js → supabase-Dbqr141s.js} +2 -2
- package/dist/supabase-hook-BULg7Ut_.js +2 -0
- package/dist/{supabase-hook-CSLQ4zJ3.js → supabase-hook-Cva3ikXz.js} +731 -782
- package/dist/{supautils-Cn4R4cJ4.js → supautils-B6HYL9eL.js} +2 -2
- package/dist/svelte/Protected.svelte +9 -2
- package/dist/svelte/index.d.ts +6 -6
- package/dist/svelte/index.js +25 -11
- package/dist/svelte/runtime.d.ts +10 -3
- package/dist/svelte/runtime.js +4 -3
- package/dist/svelte/source.d.ts +6 -6
- package/dist/svelte/source.js +4 -4
- package/dist/{validity-uOp8UpYn.js → tenancy-DshjqY0n.js} +3 -39
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +18 -34
- package/dist/testing/index.d.ts +89 -77
- package/dist/testing/index.js +1276 -1262
- package/dist/testing/saas/index.d.ts +4 -4
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.d.ts +1 -1
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/thenable-QSmvt-vZ.js +65 -0
- package/dist/{token-CIWxJOCh.js → token-Bx9qy30p.js} +1 -1
- package/dist/tool-refusal-CQ7OEia9.js +41 -0
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +7 -8
- package/dist/{types-DbjRN55U.d.ts → types-7rJVLWe5.d.ts} +82 -4
- package/dist/{types-aqOHTHcp.d.ts → types-Br9IXUBG.d.ts} +1 -1
- package/dist/types-ByUo56un.d.ts +88 -0
- package/dist/{types-Cq_H8N_X.d.ts → types-C0dee0Qf.d.ts} +2 -2
- package/dist/{types-DxiCGmmd.d.ts → types-CIlTojhq.d.ts} +2 -2
- package/dist/{types-QCuYJh4q.d.ts → types-CUcFZfpU.d.ts} +1 -1
- package/dist/{types-C97IskBw.d.ts → types-CqrjB9o6.d.ts} +1 -1
- package/dist/{types-BnIEz1sU.d.ts → types-DHrmBJLH.d.ts} +24 -6
- package/dist/{types-Dnemwd77.d.ts → types-DpWfQdSh.d.ts} +5 -1
- package/dist/{types-Bvc4oWT6.d.ts → types-DvupZE0w.d.ts} +1 -1
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-GTixvDDU.js → usage-4G6t643F.js} +2 -2
- package/dist/{usage-ItS7nLcl.js → usage-CG9nOYZw.js} +7 -7
- package/dist/usage-iFLJ0-rr.js +2 -0
- package/dist/{validation-error-Ba264OaJ.d.ts → validation-error-BSSw0l_8.d.ts} +1 -1
- package/dist/{validation-error-CnjZ4t92.js → validation-error-ZfUHbKvf.js} +1 -1
- package/dist/validity-dVrUEPJt.js +62 -0
- package/dist/{verifier-BxBo6I44.js → verifier-DMr_Zmb_.js} +51 -15
- package/dist/{rls-verify-CVQTHTh5.js → verify-BztUB3GX.js} +668 -239
- package/dist/{version-BvacVTZR.js → version-BEogC-rB.js} +1 -1
- package/dist/{views-Soe7bGSC.js → views-CJsrBS1f.js} +23 -1
- package/dist/{vocabulary-DA8a8zif.d.ts → vocabulary-hhEFLFoL.d.ts} +15 -6
- package/dist/vue/index.d.ts +24 -19
- package/dist/vue/index.js +24 -8
- package/dist/watch-C8TpsAl4.js +2 -0
- package/dist/{watch-DVBJ9cBq.js → watch-zeucB7eF.js} +6 -6
- package/dist/webmcp/index.d.ts +2 -2
- package/dist/webmcp/index.js +13 -37
- package/dist/wrap-Cr93qqdP.d.ts +14 -0
- package/dist/wrap-DWsU_5Bd.js +26 -0
- package/package.json +8 -8
- package/schemas/catalog-v1.json +6 -0
- package/skills/permdock-credentials/SKILL.md +1 -1
- package/skills/permdock-credentials/references/tokens-keys-links.md +7 -2
- package/skills/permdock-data/references/queries-and-rls.md +4 -0
- package/skills/permdock-tenancy/references/ownership-and-custom-roles.md +1 -0
- package/skills/permdock-wire/SKILL.md +2 -2
- package/skills/permdock-wire/references/adapters.md +9 -1
- package/skills/permdock-wire/references/policy-options.md +10 -1
- package/dist/catalog-CRW5Mx_B.js +0 -2
- package/dist/collect-DSWOk19R.js +0 -2
- package/dist/create-CMwIl-w2.js +0 -253
- package/dist/delegation-D8pUEuce.js +0 -103
- package/dist/doctor-collect-CHk6XWOA.js +0 -665
- package/dist/doctor-igIiM_Hl.js +0 -1194
- package/dist/evaluation-items-CfCCejQd.js +0 -40
- package/dist/fields-BMl1RxoX.js +0 -26
- package/dist/grantee-Cv5Sogfv.js +0 -602
- package/dist/hosted-DJQw46hn.js +0 -266
- package/dist/instance-options-Dhhcnm3y.js +0 -22
- package/dist/load-DwJUafYN.js +0 -2
- package/dist/map-AcxK9o_D.js +0 -147
- package/dist/permissions-DVoF6dMt.js +0 -662
- package/dist/powersync-e_AZrKbg.js +0 -2
- package/dist/protected-xAr24FEC.d.ts +0 -40
- package/dist/relations-cjOL01hZ.js +0 -505
- package/dist/rls-graph-CHwx0V8q.js +0 -435
- package/dist/rls-shared-Cewd_-zI.js +0 -495
- package/dist/store-jOBYpiXC.d.ts +0 -36
- package/dist/stores-C0IMQrGI.d.ts +0 -52
- package/dist/supabase-config-BpPXt3x1.js +0 -472
- package/dist/supabase-hook-6sYLXg_u.js +0 -2
- package/dist/thenable-okc2xDsj.js +0 -10
- package/dist/types-CKNSyIf_.d.ts +0 -52
- package/dist/usage-DorAJiU_.js +0 -2
- package/dist/watch-BwxLTYMZ.js +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as canonicalJson } from "./canonical-json-
|
|
1
|
+
import { t as catalogFingerprint } from "./src-Bb7no-hS.js";
|
|
2
|
+
import { a as getResource, c as listPermissions, h as formerKeys } from "./permission-registry-BsblpB-z.js";
|
|
3
|
+
import { m as findRole } from "./grantee-CXY-0C87.js";
|
|
4
|
+
import { t as canonicalJson } from "./canonical-json-CFKyFOke.js";
|
|
5
5
|
import { t as byCodePoint } from "./compare-pfyVnBjE.js";
|
|
6
|
-
import { t as catalogSchema } from "./schema-
|
|
6
|
+
import { t as catalogSchema } from "./schema-DjQBcAP9.js";
|
|
7
7
|
import { t as policyRowConditionKeys } from "./row-conditions-h2HythXQ.js";
|
|
8
|
-
import { s as generatorBanner, t as CATALOG_SCHEMA } from "./version-
|
|
8
|
+
import { s as generatorBanner, t as CATALOG_SCHEMA } from "./version-BEogC-rB.js";
|
|
9
9
|
//#region src/cli/catalog-doc.ts
|
|
10
10
|
function leafLevels(tree, leaf) {
|
|
11
11
|
if (leaf.kind !== "instance") return;
|
|
@@ -27,7 +27,8 @@ function buildCatalog(tree, scan, generatedAt, policy) {
|
|
|
27
27
|
relations: node?.relations,
|
|
28
28
|
version: node?.version,
|
|
29
29
|
restricted: node?.restricted,
|
|
30
|
-
restrictedStops: node?.restrictedStops
|
|
30
|
+
restrictedStops: node?.restrictedStops,
|
|
31
|
+
meta: node?.meta
|
|
31
32
|
} : {
|
|
32
33
|
id: node?.id ?? "id",
|
|
33
34
|
schema: node === void 0 ? null : jsonSchemaOf(node),
|
|
@@ -35,7 +36,8 @@ function buildCatalog(tree, scan, generatedAt, policy) {
|
|
|
35
36
|
relations: node?.relations,
|
|
36
37
|
version: node?.version,
|
|
37
38
|
restricted: node?.restricted,
|
|
38
|
-
restrictedStops: node?.restrictedStops
|
|
39
|
+
restrictedStops: node?.restrictedStops,
|
|
40
|
+
meta: node?.meta
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
const approvals = codeApprovals(policy);
|
|
@@ -119,7 +121,8 @@ function catalogGrant(grant) {
|
|
|
119
121
|
purpose: grant.purpose,
|
|
120
122
|
requires: grant.requires?.length === 1 ? grant.requires[0] : grant.requires,
|
|
121
123
|
limit,
|
|
122
|
-
portable: grant.portable ? void 0 : false
|
|
124
|
+
portable: grant.portable ? void 0 : false,
|
|
125
|
+
meta: nonEmpty(grant.meta)
|
|
123
126
|
})
|
|
124
127
|
};
|
|
125
128
|
}
|
|
@@ -240,10 +243,14 @@ function compactResource(resource) {
|
|
|
240
243
|
relations,
|
|
241
244
|
version: resource.version,
|
|
242
245
|
restricted: resource.restricted,
|
|
243
|
-
restrictedStops: resource.restrictedStops
|
|
246
|
+
restrictedStops: resource.restrictedStops,
|
|
247
|
+
meta: nonEmpty(resource.meta)
|
|
244
248
|
})
|
|
245
249
|
};
|
|
246
250
|
}
|
|
251
|
+
function nonEmpty(meta) {
|
|
252
|
+
return meta === void 0 || Object.keys(meta).length === 0 ? void 0 : { ...meta };
|
|
253
|
+
}
|
|
247
254
|
function metaRecord(meta) {
|
|
248
255
|
return { ...meta };
|
|
249
256
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as
|
|
3
|
-
import { a as loadModule, i as loadConfiguredPolicy,
|
|
4
|
-
import { i as scanSources, r as runCollect } from "./collect-
|
|
1
|
+
import { r as listSourceFiles, t as defaultSrcPath } from "./files-D_JIzUrP.js";
|
|
2
|
+
import { a as formatCatalogMarkdown, i as formatCatalogJson, r as catalogSchemaDocument, t as buildCatalog } from "./catalog-doc-DWtg0gGR.js";
|
|
3
|
+
import { a as loadModule, i as loadConfiguredPolicy, r as leavesOf, s as pickNamed, t as asPermissionTree } from "./load-C3_oTHyO.js";
|
|
4
|
+
import { i as scanSources, r as runCollect } from "./collect-2SrB7lfk.js";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
//#region src/cli/catalog.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as ApprovalStore } from "../types-
|
|
3
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
4
|
-
import { t as ToolMap } from "../types-
|
|
1
|
+
import { E as Policy, Or as Principal, j as PolicyVocabulary, jt as PermDock, wr as Delegation } from "../policy-types-sp9P1iIV.js";
|
|
2
|
+
import { f as ApprovalStore } from "../types-Br9IXUBG.js";
|
|
3
|
+
import { t as InstanceOptions } from "../instance-options-plkrsAog.js";
|
|
4
|
+
import { t as ToolMap } from "../types-DvupZE0w.js";
|
|
5
5
|
//#region src/claude-agent/create.d.ts
|
|
6
6
|
/** Structural `McpServerProvenance` from `@anthropic-ai/claude-agent-sdk`. */
|
|
7
7
|
type ClaudeMcpServer = {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as compact } from "../compact-
|
|
2
|
-
import {
|
|
3
|
-
import { n as createAgentKernel } from "../kernel-
|
|
1
|
+
import { r as isRecord, t as compact } from "../compact-CAf557ZB.js";
|
|
2
|
+
import { r as instanceOptions } from "../build-instance-DIIV9DbC.js";
|
|
3
|
+
import { n as createAgentKernel } from "../kernel-CB3LrIJM.js";
|
|
4
4
|
//#region src/claude-agent/create.ts
|
|
5
5
|
const MCP_PREFIX = "mcp__";
|
|
6
6
|
function asInput(input) {
|
|
7
|
-
|
|
8
|
-
return {};
|
|
7
|
+
return isRecord(input) ? input : {};
|
|
9
8
|
}
|
|
10
9
|
function untrustedServer(context, sources) {
|
|
11
10
|
if (!context.toolName.startsWith(MCP_PREFIX)) return;
|
package/dist/clerk/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { s as RemotePdpCache } from "../types-
|
|
1
|
+
import { Or as Principal, kr as Subject, nt as RoleSource } from "../policy-types-sp9P1iIV.js";
|
|
2
|
+
import { d as Permission } from "../permission-types-Dg39z9Kv.js";
|
|
3
|
+
import { s as RemotePdpCache } from "../types-CIlTojhq.js";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
//#region src/clerk/types.d.ts
|
|
6
6
|
type ClerkPrincipal = Principal & {
|
package/dist/clerk/index.js
CHANGED
|
@@ -1,36 +1,16 @@
|
|
|
1
|
-
import { t as compact } from "../compact-
|
|
1
|
+
import { i as omitKeys, r as isRecord, t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "../freeze-CrU8nQeX.js";
|
|
3
|
-
import {
|
|
3
|
+
import { l as readPath, r as validateRecord } from "../thenable-QSmvt-vZ.js";
|
|
4
4
|
import { t as anonymousSubject } from "../subject-C6dLxqHU.js";
|
|
5
|
-
import { c as ttlMs, s as ttlCache } from "../shared-
|
|
5
|
+
import { c as ttlMs, s as ttlCache } from "../shared-JhMeOsDF.js";
|
|
6
6
|
//#region src/clerk/subject.ts
|
|
7
|
-
function isRecord(value) {
|
|
8
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
9
|
-
}
|
|
10
7
|
function asRoles(value) {
|
|
11
8
|
if (typeof value === "string") return value === "" ? [] : [value];
|
|
12
9
|
if (!Array.isArray(value)) return [];
|
|
13
10
|
return value.filter((item) => typeof item === "string");
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
for (const part of path.split(".")) {
|
|
18
|
-
if (!isRecord(current) || !Object.hasOwn(current, part)) return;
|
|
19
|
-
current = current[part];
|
|
20
|
-
}
|
|
21
|
-
return current;
|
|
22
|
-
}
|
|
23
|
-
function validateClaims(extra, schema) {
|
|
24
|
-
const result = schema["~standard"].validate(extra);
|
|
25
|
-
if (result instanceof Promise) {
|
|
26
|
-
ignoreRejection(result);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if ("issues" in result && result.issues !== void 0) return;
|
|
30
|
-
const value = result.value;
|
|
31
|
-
return isRecord(value) ? value : void 0;
|
|
32
|
-
}
|
|
33
|
-
const REGISTERED_CLAIMS = /* @__PURE__ */ new Set([
|
|
12
|
+
/** Registered claims plus `unsafeMetadata`, which the user can edit. */
|
|
13
|
+
const NOT_EXTRA = /* @__PURE__ */ new Set([.../* @__PURE__ */ new Set([
|
|
34
14
|
"iss",
|
|
35
15
|
"sub",
|
|
36
16
|
"aud",
|
|
@@ -47,14 +27,9 @@ const REGISTERED_CLAIMS = /* @__PURE__ */ new Set([
|
|
|
47
27
|
"fea",
|
|
48
28
|
"o",
|
|
49
29
|
"v"
|
|
50
|
-
]);
|
|
30
|
+
]), "unsafeMetadata"]);
|
|
51
31
|
function extraClaims(claims) {
|
|
52
|
-
|
|
53
|
-
for (const [key, value] of Object.entries(claims)) {
|
|
54
|
-
if (REGISTERED_CLAIMS.has(key) || key === "unsafeMetadata") continue;
|
|
55
|
-
extra[key] = value;
|
|
56
|
-
}
|
|
57
|
-
return extra;
|
|
32
|
+
return omitKeys(claims, NOT_EXTRA);
|
|
58
33
|
}
|
|
59
34
|
/**
|
|
60
35
|
* Plan slugs from `pla`, split by owner: `o:` plans belong to the session's
|
|
@@ -273,7 +248,7 @@ async function fromClerk(authObject, options, loadMemberships) {
|
|
|
273
248
|
return true;
|
|
274
249
|
})];
|
|
275
250
|
let claims = extraClaims(mapped.claims);
|
|
276
|
-
if (options.schema !== void 0) claims =
|
|
251
|
+
if (options.schema !== void 0) claims = validateRecord(options.schema, claims) ?? {};
|
|
277
252
|
const global = [...globalRolesFrom(mapped.claims, options.globalRoles), ...features.user];
|
|
278
253
|
const exp = mapped.claims["exp"];
|
|
279
254
|
const principal = compact({
|
package/dist/cli/bin.js
CHANGED
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as CatalogDocument, c as CatalogResource, d as CatalogSupportAccess, f as CatalogUsage, l as CatalogRole, n as CatalogApproval, r as CatalogBreakGlass, s as CatalogPermission, t as CatalogActivation, u as CatalogScope } from "../types-
|
|
2
|
-
import { _ as RunResult, c as RlsConfig, d as RlsMembershipTable, f as RlsMemberships, g as RlsTarget, h as RlsSuspension, i as PermDockConfig, l as RlsDialect, m as RlsSuspendedScope, n as CliIo, o as RlsActiveRow, p as RlsSuspendedMembership, r as CollectConfig, s as RlsApiKeys, t as CatalogConfig, u as RlsFunctionMapping } from "../types-
|
|
1
|
+
import { a as CatalogDocument, c as CatalogResource, d as CatalogSupportAccess, f as CatalogUsage, l as CatalogRole, n as CatalogApproval, r as CatalogBreakGlass, s as CatalogPermission, t as CatalogActivation, u as CatalogScope } from "../types-DpWfQdSh.js";
|
|
2
|
+
import { _ as RunResult, c as RlsConfig, d as RlsMembershipTable, f as RlsMemberships, g as RlsTarget, h as RlsSuspension, i as PermDockConfig, l as RlsDialect, m as RlsSuspendedScope, n as CliIo, o as RlsActiveRow, p as RlsSuspendedMembership, r as CollectConfig, s as RlsApiKeys, t as CatalogConfig, u as RlsFunctionMapping } from "../types-7rJVLWe5.js";
|
|
3
3
|
//#region src/cli/catalog-path.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The absolute path `permdock collect` writes the catalog to: `collect.out`,
|
|
@@ -11,7 +11,7 @@ export declare function catalogPath(config: PermDockConfig, cwd: string, out?: s
|
|
|
11
11
|
//#region src/cli/config.d.ts
|
|
12
12
|
export declare function defineConfig<T extends PermDockConfig>(config: T): T;
|
|
13
13
|
//#endregion
|
|
14
|
-
//#region src/cli/markers.d.ts
|
|
14
|
+
//#region src/cli/sql/markers.d.ts
|
|
15
15
|
/** The first line of a hook migration `permdock supabase hook generate` wrote. */
|
|
16
16
|
type SupabaseHookMarker = {
|
|
17
17
|
/** The marker's major: `1` for `-- permdock:hook v1`. */
|
package/dist/cli/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as catalogPath } from "../catalog-path-CnI0XTFK.js";
|
|
2
|
-
import { t as defineConfig } from "../config-
|
|
3
|
-
import {
|
|
4
|
-
import { t as run } from "../run-
|
|
2
|
+
import { t as defineConfig } from "../config-BIjREpyE.js";
|
|
3
|
+
import { c as parseGrantsMarker, l as parseHookMarker } from "../markers-CiwAOZtO.js";
|
|
4
|
+
import { t as run } from "../run-DMcNW_8T.js";
|
|
5
5
|
export { catalogPath, defineConfig, parseGrantsMarker, parseHookMarker, run };
|
package/dist/cloud/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as ApprovalStore } from "../types-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Cn as MembershipEvent, Ht as PolicySource, Sn as DirectoryEvent, W as DecisionSink, at as SnapshotSource, bn as CredentialEvent, ct as TokenFailureCause, ut as TokenVerifier, vn as AccessEvent, xn as DecisionEvent } from "../policy-types-sp9P1iIV.js";
|
|
2
|
+
import { f as ApprovalStore } from "../types-Br9IXUBG.js";
|
|
3
|
+
import { a as JsonWebKeySet, g as ReplayStore } from "../types-C0dee0Qf.js";
|
|
4
|
+
import { n as CatalogEventData, o as CloudEventType } from "../sink-CPN4zLfs.js";
|
|
5
5
|
//#region src/cloud/types.d.ts
|
|
6
6
|
type CloudEndpointOptions = {
|
|
7
7
|
readonly url?: string;
|
package/dist/cloud/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as compact } from "../compact-
|
|
1
|
+
import { r as isRecord, t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "../freeze-CrU8nQeX.js";
|
|
3
|
-
import {
|
|
4
|
-
import { i as parsePolicyDocument } from "../hosted-
|
|
5
|
-
import { t as CLOUD_EVENT_TYPES } from "../sink-
|
|
3
|
+
import { o as isForbiddenKey } from "../thenable-QSmvt-vZ.js";
|
|
4
|
+
import { i as parsePolicyDocument } from "../hosted-CBHgkzDl.js";
|
|
5
|
+
import { t as CLOUD_EVENT_TYPES } from "../sink-BTtmfPnE.js";
|
|
6
6
|
import { r as isApprovalErrorCode, t as ApprovalError } from "../errors-DRnGZHzF.js";
|
|
7
|
-
import { t as joseTokenVerifier } from "../verifier-
|
|
7
|
+
import { t as joseTokenVerifier } from "../verifier-DMr_Zmb_.js";
|
|
8
8
|
import { t as timeoutSignal } from "../timeout-D51niuQP.js";
|
|
9
9
|
//#region src/cloud/create.ts
|
|
10
10
|
/** Milliseconds a PermDock Cloud request may take; a slower one fails like an unreachable Cloud. */
|
|
@@ -20,11 +20,8 @@ function firstNonEmpty(...values) {
|
|
|
20
20
|
function trimSlash(value) {
|
|
21
21
|
return value.endsWith("/") ? value.slice(0, -1) : value;
|
|
22
22
|
}
|
|
23
|
-
function isRecord$1(value) {
|
|
24
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
25
|
-
}
|
|
26
23
|
function asApproval(value) {
|
|
27
|
-
if (!isRecord
|
|
24
|
+
if (!isRecord(value) || value["v"] !== 1 || typeof value["token"] !== "string") return null;
|
|
28
25
|
return value;
|
|
29
26
|
}
|
|
30
27
|
function isCompactJws$1(value) {
|
|
@@ -138,7 +135,7 @@ function cloud(options = {}) {
|
|
|
138
135
|
const response = await request(`/approvals${suffix}`);
|
|
139
136
|
if (!response.ok) return { items: [] };
|
|
140
137
|
const body = await response.json();
|
|
141
|
-
if (!isRecord
|
|
138
|
+
if (!isRecord(body) || !Array.isArray(body["items"])) return { items: [] };
|
|
142
139
|
const items = body["items"].flatMap((item) => {
|
|
143
140
|
const parsed = asApproval(item);
|
|
144
141
|
return parsed === null ? [] : [parsed];
|
|
@@ -162,7 +159,7 @@ function cloud(options = {}) {
|
|
|
162
159
|
});
|
|
163
160
|
if (!response.ok) throw new Error("PermDock Cloud rejected the approval cancel");
|
|
164
161
|
const body = await response.json();
|
|
165
|
-
if (!isRecord
|
|
162
|
+
if (!isRecord(body) || typeof body["cancelled"] !== "number") throw new Error("PermDock Cloud returned an unknown cancel shape");
|
|
166
163
|
return body["cancelled"];
|
|
167
164
|
},
|
|
168
165
|
async expire(now) {
|
|
@@ -173,7 +170,7 @@ function cloud(options = {}) {
|
|
|
173
170
|
});
|
|
174
171
|
if (!response.ok) return 0;
|
|
175
172
|
const body = await response.json();
|
|
176
|
-
if (!isRecord
|
|
173
|
+
if (!isRecord(body) || typeof body["expired"] !== "number") return 0;
|
|
177
174
|
return body["expired"];
|
|
178
175
|
} catch {
|
|
179
176
|
return 0;
|
|
@@ -261,9 +258,6 @@ function cloud(options = {}) {
|
|
|
261
258
|
//#endregion
|
|
262
259
|
//#region src/cloud/webhook.ts
|
|
263
260
|
const TYPES = new Set(Object.values(CLOUD_EVENT_TYPES));
|
|
264
|
-
function isRecord(value) {
|
|
265
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
266
|
-
}
|
|
267
261
|
function hasUnsafeKey(value) {
|
|
268
262
|
if (Array.isArray(value)) return value.some(hasUnsafeKey);
|
|
269
263
|
if (!isRecord(value)) return false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-
|
|
1
|
+
import { i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-Cpip4ULx.js";
|
|
2
2
|
import { defineCommand } from "citty";
|
|
3
3
|
//#region src/cli/commands/cloud.ts
|
|
4
4
|
function cloud(ctx) {
|
|
@@ -30,7 +30,7 @@ function cloud(ctx) {
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
async run({ args: parsed }) {
|
|
33
|
-
const result = await (await import("./cloud-
|
|
33
|
+
const result = await (await import("./cloud-PeBN3IEn.js")).runCloud({
|
|
34
34
|
cwd: ctx.cwd,
|
|
35
35
|
config: ctx.config,
|
|
36
36
|
rest: parsed._,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as catalogFingerprint } from "./src-
|
|
2
|
-
import { s as snapshotScopes } from "./permdock-
|
|
1
|
+
import { t as catalogFingerprint } from "./src-Bb7no-hS.js";
|
|
2
|
+
import { s as snapshotScopes } from "./permdock-L26udHSk.js";
|
|
3
3
|
import { i as describeError } from "./errors-CWfoNg9N.js";
|
|
4
|
-
import { i as loadConfiguredPolicy } from "./load-
|
|
5
|
-
import { t as parseCatalog } from "./parse-
|
|
6
|
-
import { t as runCatalog } from "./catalog-
|
|
4
|
+
import { i as loadConfiguredPolicy } from "./load-C3_oTHyO.js";
|
|
5
|
+
import { t as parseCatalog } from "./parse-CVFQHk6c.js";
|
|
6
|
+
import { t as runCatalog } from "./catalog-tZUyOfOv.js";
|
|
7
7
|
//#region src/cli/cloud.ts
|
|
8
8
|
function firstNonEmpty(...values) {
|
|
9
9
|
for (const value of values) if (value !== void 0 && value !== "") return value;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as describeError } from "./errors-CWfoNg9N.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as rel, r as listSourceFiles, s as writeFileEnsuringDir, t as defaultSrcPath } from "./files-D_JIzUrP.js";
|
|
3
|
+
import { i as formatCatalogJson, n as catalogForCompare, t as buildCatalog } from "./catalog-doc-DWtg0gGR.js";
|
|
3
4
|
import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
|
|
4
|
-
import { i as
|
|
5
|
-
import { a as loadModule, i as loadConfiguredPolicy, o as pickNamed, r as leavesOf, t as asPermissionTree } from "./load-DhWEB9P1.js";
|
|
5
|
+
import { a as loadModule, i as loadConfiguredPolicy, r as leavesOf, s as pickNamed, t as asPermissionTree } from "./load-C3_oTHyO.js";
|
|
6
6
|
import { t as shortDiff } from "./text-diff-BdkkYSbi.js";
|
|
7
|
-
import { existsSync,
|
|
7
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { dirname, relative, resolve } from "node:path";
|
|
9
9
|
import { Visitor, parseSync, visitorKeys } from "oxc-parser";
|
|
10
10
|
//#region src/cli/scan.ts
|
|
@@ -455,8 +455,7 @@ async function runCollect(input) {
|
|
|
455
455
|
message: `catalog up to date: ${rel(input.cwd, outPath)}`
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
|
-
|
|
459
|
-
writeFileSync(outPath, next);
|
|
458
|
+
writeFileEnsuringDir(outPath, next);
|
|
460
459
|
const written = [outPath];
|
|
461
460
|
const barrel = input.collect.barrel ?? input.config.collect?.barrel;
|
|
462
461
|
if (barrel !== void 0 && barrel !== false) {
|
|
@@ -495,8 +494,7 @@ import { permissions as collected } from '${specifier.startsWith(".") ? specifie
|
|
|
495
494
|
|
|
496
495
|
export const permissions = mergePermissions(collected)
|
|
497
496
|
`;
|
|
498
|
-
|
|
499
|
-
writeFileSync(abs, body);
|
|
497
|
+
writeFileEnsuringDir(abs, body);
|
|
500
498
|
}
|
|
501
499
|
//#endregion
|
|
502
500
|
export { scanSources as i, guessPermissions as n, runCollect as r, barrelFile as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as describeError } from "./errors-CWfoNg9N.js";
|
|
2
|
-
import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-
|
|
2
|
+
import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-Cpip4ULx.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/collect.ts
|
|
5
5
|
function collect(ctx) {
|
|
@@ -44,7 +44,7 @@ function collect(ctx) {
|
|
|
44
44
|
});
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
const { createCollectScheduler } = await import("./watch-
|
|
47
|
+
const { createCollectScheduler } = await import("./watch-C8TpsAl4.js");
|
|
48
48
|
const scheduler = createCollectScheduler(ctx.cwd, { collect: overrides }, {
|
|
49
49
|
...ctx.configFile === void 0 ? {} : { configFile: ctx.configFile },
|
|
50
50
|
report: (message) => {
|
|
@@ -64,7 +64,7 @@ function collect(ctx) {
|
|
|
64
64
|
});
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
const result = await (await import("./collect-
|
|
67
|
+
const result = await (await import("./collect-Bw2Jdq1q.js")).runCollect({
|
|
68
68
|
cwd: ctx.cwd,
|
|
69
69
|
config: ctx.config,
|
|
70
70
|
collect: overrides,
|
|
@@ -76,19 +76,19 @@ const COMMAND_DESCRIPTIONS = {
|
|
|
76
76
|
};
|
|
77
77
|
/** Every top-level command, loaded only when it runs or its own `--help` is asked for. */
|
|
78
78
|
const commands = {
|
|
79
|
-
collect: async () => (await import("./collect-
|
|
80
|
-
catalog: async () => (await import("./catalog-
|
|
81
|
-
diff: async () => (await import("./diff-
|
|
82
|
-
usage: async () => (await import("./usage-
|
|
83
|
-
doctor: async () => (await import("./doctor-
|
|
84
|
-
config: async () => (await import("./config-
|
|
85
|
-
skills: async () => (await import("./skills-
|
|
86
|
-
openapi: async () => (await import("./openapi-
|
|
87
|
-
rls: async () => (await import("./rls-
|
|
88
|
-
arazzo: async () => (await import("./arazzo-
|
|
89
|
-
cloud: async () => (await import("./cloud-
|
|
90
|
-
supabase: async () => (await import("./supabase-
|
|
91
|
-
powersync: async () => (await import("./powersync-
|
|
79
|
+
collect: async () => (await import("./collect-CQx4hX4N.js")).collect,
|
|
80
|
+
catalog: async () => (await import("./catalog-WHG4kBq7.js")).catalog,
|
|
81
|
+
diff: async () => (await import("./diff-Cnghh_Ip.js")).diff,
|
|
82
|
+
usage: async () => (await import("./usage-4G6t643F.js")).usage,
|
|
83
|
+
doctor: async () => (await import("./doctor-CuVJvhV_.js")).doctor,
|
|
84
|
+
config: async () => (await import("./config-DLt6BvV7.js")).config,
|
|
85
|
+
skills: async () => (await import("./skills-Dle4ZoLF.js")).skills,
|
|
86
|
+
openapi: async () => (await import("./openapi-DcQ1Kg40.js")).openapi,
|
|
87
|
+
rls: async () => (await import("./rls-55DQTuf5.js")).rls,
|
|
88
|
+
arazzo: async () => (await import("./arazzo-CD8d0WLb.js")).arazzo,
|
|
89
|
+
cloud: async () => (await import("./cloud-C7bSDgX4.js")).cloud,
|
|
90
|
+
supabase: async () => (await import("./supabase-Dbqr141s.js")).supabase,
|
|
91
|
+
powersync: async () => (await import("./powersync-BFSbSElQ.js")).powersync
|
|
92
92
|
};
|
|
93
93
|
function isCommand(name) {
|
|
94
94
|
return Object.hasOwn(commands, name);
|
|
@@ -15,5 +15,15 @@ function isReadonlyArray(value) {
|
|
|
15
15
|
function sole(items) {
|
|
16
16
|
return items.length === 1 ? items[0] : void 0;
|
|
17
17
|
}
|
|
18
|
+
/** A plain object: not `null` and not an array. */
|
|
19
|
+
function isRecord(value) {
|
|
20
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
21
|
+
}
|
|
22
|
+
/** The own entries of `record` whose key is not in `reserved`. */
|
|
23
|
+
function omitKeys(record, reserved) {
|
|
24
|
+
const out = {};
|
|
25
|
+
for (const [key, value] of Object.entries(record)) if (!reserved.has(key)) out[key] = value;
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
18
28
|
//#endregion
|
|
19
|
-
export { isReadonlyArray as n,
|
|
29
|
+
export { sole as a, omitKeys as i, isReadonlyArray as n, isRecord as r, compact as t };
|
package/dist/compile/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as GraphSqlPart, r as RelationsMapping, t as GraphSql } from "../graph-sql-B-dsAT6j.js";
|
|
2
|
-
import { a as CompiledWhere, c as compileWhere, i as CompiledSql, l as escapeLike, n as CompiledCompare, o as MembershipTable, r as CompiledExists, s as MembershipsMapping, t as CompileWhereOptions } from "../compile-
|
|
2
|
+
import { a as CompiledWhere, c as compileWhere, i as CompiledSql, l as escapeLike, n as CompiledCompare, o as MembershipTable, r as CompiledExists, s as MembershipsMapping, t as CompileWhereOptions } from "../compile-CtTP7eur.js";
|
|
3
3
|
export { type CompileWhereOptions, type CompiledCompare, type CompiledExists, type CompiledSql, type CompiledWhere, type GraphSql, type GraphSqlPart, type MembershipTable, type MembershipsMapping, type RelationsMapping, compileWhere, escapeLike };
|
package/dist/compile/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as escapeLike, t as compileWhere } from "../compile-
|
|
1
|
+
import { n as escapeLike, t as compileWhere } from "../compile-CcEu2ZQ1.js";
|
|
2
2
|
export { compileWhere, escapeLike };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { c as isConditionRef, i as resolveConditionRef, s as isConditionDate, u as parentHop } from "./refs-
|
|
4
|
-
import { n as PermDockValidationError } from "./validation-error-
|
|
1
|
+
import { a as sole, n as isReadonlyArray, t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
+
import { a as assertSafeKey } from "./thenable-QSmvt-vZ.js";
|
|
3
|
+
import { c as isConditionRef, i as resolveConditionRef, s as isConditionDate, u as parentHop } from "./refs-f3imMjNW.js";
|
|
4
|
+
import { n as PermDockValidationError } from "./validation-error-ZfUHbKvf.js";
|
|
5
5
|
import { t as expiredAt } from "./expiry-BoBJ8Tvc.js";
|
|
6
|
-
import { c as rootScope, d as scopeList, l as scopeChain, m as tenantOf, o as resolveScope, p as subjectMemberships } from "./scopes-
|
|
6
|
+
import { c as rootScope, d as scopeList, l as scopeChain, m as tenantOf, o as resolveScope, p as subjectMemberships } from "./scopes-tvpa34ep.js";
|
|
7
|
+
import { a as expandRelation, c as isEdgeRelation, d as isSelfParented, l as isFieldRelation, o as groupEntries, p as restrictedFor, u as isPrincipalRelation } from "./resource-relations-D1Un3pcz.js";
|
|
7
8
|
//#region src/conditions/graph-sql.ts
|
|
8
9
|
/** A Postgres identifier, schema-qualified names split on `.`. */
|
|
9
10
|
function quoteSqlName(name) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { y as ResourceNode } from "./
|
|
1
|
+
import { It as WhereResult, hn as Scope, jr as Condition, kr as Subject } from "./policy-types-sp9P1iIV.js";
|
|
2
|
+
import { y as ResourceNode } from "./permission-types-Dg39z9Kv.js";
|
|
3
3
|
import { r as RelationsMapping, t as GraphSql } from "./graph-sql-B-dsAT6j.js";
|
|
4
4
|
//#region src/conditions/compile.d.ts
|
|
5
5
|
type MembershipTable = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { r as isRecord } from "./compact-CAf557ZB.js";
|
|
1
2
|
import { t as CliError } from "./errors-CWfoNg9N.js";
|
|
2
3
|
import { existsSync } from "node:fs";
|
|
3
4
|
import { relative, resolve } from "node:path";
|
|
@@ -33,6 +34,8 @@ const SECTIONS = {
|
|
|
33
34
|
authorize: true,
|
|
34
35
|
policyPerRole: true,
|
|
35
36
|
customRoles: true,
|
|
37
|
+
triggers: true,
|
|
38
|
+
audit: true,
|
|
36
39
|
capabilities: true,
|
|
37
40
|
anonymousSignIns: true,
|
|
38
41
|
fields: true,
|
|
@@ -81,9 +84,6 @@ const TOP_LEVEL = /* @__PURE__ */ new Set([
|
|
|
81
84
|
"policy",
|
|
82
85
|
...Object.keys(SECTIONS)
|
|
83
86
|
]);
|
|
84
|
-
function isRecord(value) {
|
|
85
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
86
|
-
}
|
|
87
87
|
function isSection(key) {
|
|
88
88
|
return Object.hasOwn(SECTIONS, key);
|
|
89
89
|
}
|
|
@@ -141,7 +141,7 @@ async function readConfig(cwd, fromFlag, options) {
|
|
|
141
141
|
file: void 0
|
|
142
142
|
};
|
|
143
143
|
if (!existsSync(path)) throw new Error(`PermDock CLI: config file not found: ${path}`);
|
|
144
|
-
const { loadModule, pickNamed } = await import("./load-
|
|
144
|
+
const { loadModule, pickNamed } = await import("./load-B_shHrmd.js");
|
|
145
145
|
return {
|
|
146
146
|
...parseConfig(pickNamed(await loadModule(path, options), ["default"]), relative(cwd, path).replaceAll("\\", "/")),
|
|
147
147
|
file: path
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as globalArgs, t as COMMAND_DESCRIPTIONS } from "./commands-
|
|
1
|
+
import { i as globalArgs, t as COMMAND_DESCRIPTIONS } from "./commands-Cpip4ULx.js";
|
|
2
2
|
import { defineCommand } from "citty";
|
|
3
3
|
//#region src/cli/commands/config.ts
|
|
4
4
|
function config(ctx) {
|
|
@@ -19,7 +19,7 @@ function config(ctx) {
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
async run({ args: parsed }) {
|
|
22
|
-
const { runConfig } = await import("./config-report
|
|
22
|
+
const { runConfig } = await import("./config-report--Xb9APJS.js");
|
|
23
23
|
ctx.report(runConfig({
|
|
24
24
|
cwd: ctx.cwd,
|
|
25
25
|
config: ctx.config,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as rel, t as defaultSrcPath } from "./files-D_JIzUrP.js";
|
|
2
|
+
import { n as CONFIG_REPORT_SCHEMA } from "./version-BEogC-rB.js";
|
|
2
3
|
import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import { r as MIGRATION_DIRS } from "./supabase-config-BpPXt3x1.js";
|
|
7
|
-
import { t as DEFAULT_SENSITIVE_ACTIONS } from "./doctor-collect-CHk6XWOA.js";
|
|
4
|
+
import { n as guessPermissions, t as barrelFile } from "./collect-2SrB7lfk.js";
|
|
5
|
+
import "./sources-B1-b-R0t.js";
|
|
6
|
+
import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-DcJABbLW.js";
|
|
8
7
|
//#region src/cli/config-report.ts
|
|
9
8
|
function configReport(input) {
|
|
10
9
|
const { cwd, config } = input;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as compact } from "./compact-
|
|
2
|
-
import { r as PermDockRevokedError } from "./errors-
|
|
1
|
+
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
+
import { r as PermDockRevokedError } from "./errors-drnfxYtm.js";
|
|
3
3
|
//#region src/server/connection.ts
|
|
4
4
|
/** `setTimeout` stores delays in a signed 32-bit integer. */
|
|
5
5
|
const MAX_DELAY = 2147483647;
|
|
@@ -184,6 +184,7 @@ async function openConnection(input) {
|
|
|
184
184
|
const permdock = live();
|
|
185
185
|
return permdock === void 0 ? [] : permdock.filter(permission, items, decideOptions);
|
|
186
186
|
},
|
|
187
|
+
settled: () => chain,
|
|
187
188
|
close() {
|
|
188
189
|
closed = true;
|
|
189
190
|
clear();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/cli/shared/constants.ts
|
|
2
|
+
const DEFAULT_SENSITIVE_ACTIONS = [
|
|
3
|
+
"approve",
|
|
4
|
+
"pay",
|
|
5
|
+
"settle",
|
|
6
|
+
"submit",
|
|
7
|
+
"transfer",
|
|
8
|
+
"refund",
|
|
9
|
+
"disburse"
|
|
10
|
+
];
|
|
11
|
+
const MIGRATION_DIRS = [
|
|
12
|
+
"supabase/migrations",
|
|
13
|
+
"supabase/schemas",
|
|
14
|
+
"migrations",
|
|
15
|
+
"drizzle",
|
|
16
|
+
"prisma/migrations",
|
|
17
|
+
"db/migrations"
|
|
18
|
+
];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { MIGRATION_DIRS as n, DEFAULT_SENSITIVE_ACTIONS as t };
|