permdock 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a/index.d.ts +4 -4
- package/dist/a2a/index.js +3 -3
- package/dist/{adapter-context-CIQpQxbE.js → adapter-context-OHikyRqV.js} +1 -1
- package/dist/{adoption-scan-C2BCiUEG.js → adoption-scan-Ci0xiJ3T.js} +1 -1
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.d.ts +3 -3
- package/dist/ai-sdk/index.js +3 -3
- package/dist/approval-normalize-4KxMRdJC.js +189 -0
- package/dist/approval-policies-9VagPixq.d.ts +138 -0
- package/dist/{approval-prompt-3BqWczTt.d.ts → approval-prompt-BSh-yxbH.d.ts} +1 -1
- package/dist/approvals/index.d.ts +5 -4
- package/dist/approvals/index.js +7 -6
- package/dist/{approvals-DnIBTuXE.js → approvals-DdFcTncq.js} +3 -3
- package/dist/{approvers-B4r0N_Uz.js → approvers-CNtl4Vc5.js} +22 -1
- package/dist/{arazzo-CHoYnQXO.js → arazzo-7kbeh1yi.js} +2 -2
- package/dist/{arazzo-ClYz2Z0W.js → arazzo-_zUmT8ZT.js} +4 -4
- package/dist/{args-0FrVs5EH.js → args-iafbHiXn.js} +2 -5
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +2 -2
- package/dist/{audience-DTjR8xet.js → audience-jRO819i3.js} +1 -1
- package/dist/{auth--yPyZNgr.js → auth-j3Eu-j4h.js} +1 -1
- package/dist/authz-topic-Dbc-HDOS.js +15 -0
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +2 -2
- package/dist/{automation-C6Jg75xq.d.ts → automation-DCWuVKtd.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-auth/index.js +10 -8
- package/dist/better-supabase/index.d.ts +273 -38
- package/dist/better-supabase/index.js +493 -102
- package/dist/{better-supabase-Dirf_8Ec.js → better-supabase-BJtQ-kNf.js} +26 -10
- package/dist/{bind-BNQA9JK9.js → bind-BJFeLX1V.js} +6 -6
- package/dist/{bind-YYjvfpB9.d.ts → bind-DjFNX0Pq.d.ts} +7 -7
- package/dist/{budget-BELja5A9.js → budget-BBCPDOGP.js} +1 -1
- package/dist/{budget-hYsPz_yE.d.ts → budget-CNLsV2SL.d.ts} +1 -1
- package/dist/{build-instance-BWXqwQYU.js → build-instance-lye7oEqf.js} +3 -2
- package/dist/{capability-Di9tiUvi.d.ts → capability-BzjWdKmP.d.ts} +1 -1
- package/dist/{capability-BqX94r07.js → capability-zN6T9fxe.js} +2 -3
- package/dist/{casbin-C9EvElBb.js → casbin-C3O_O9nu.js} +2 -2
- package/dist/{casbin-D_rVQ31U.js → casbin-DFzk_so3.js} +2 -2
- package/dist/{casl-C4OINZHI.js → casl-CjBVJj8R.js} +2 -2
- package/dist/{casl-CHHoCldP.js → casl-CkBssiB1.js} +1 -1
- package/dist/catalog/index.d.ts +5 -5
- package/dist/catalog/index.js +6 -6
- package/dist/catalog-BpnjesqX.js +1 -0
- package/dist/{catalog-CGlSwU6j.js → catalog-DGDd_ww1.js} +5 -5
- package/dist/{catalog-amPDr0JQ.js → catalog-DJJIkR9P.js} +3 -3
- package/dist/{catalog-doc-DjMKzJp9.js → catalog-doc-C4DGfJCO.js} +3 -3
- package/dist/{catalog-operations-DeHTrJSV.js → catalog-operations-DVI5QO5R.js} +3 -3
- package/dist/{challenge-DImNcR7B.js → challenge-M_ghKJnT.js} +2 -2
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +2 -2
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/{checks-CGkP3Z7A.js → checks-fyDOhcz0.js} +33 -1
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +2 -2
- package/dist/clerk/index.js +10 -7
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +5 -5
- package/dist/cli/index.js +3 -3
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-DdaJ7ILM.js → cloud-DYqzmh5i.js} +4 -4
- package/dist/{codemod-ammy6wv4.js → codemod-DNGMGqBS.js} +395 -8
- package/dist/{codemod-B1USJS7a.js → codemod-DqB9klYI.js} +3 -3
- package/dist/{collect-DnXL4B8c.js → collect-C44RrKCI.js} +4 -4
- package/dist/collect-CAibhmCi.js +1 -0
- package/dist/{collect-WCl8cJQV.js → collect-HfJXl8Tr.js} +4 -4
- package/dist/compile/index.d.ts +1 -1
- package/dist/compile/index.js +1 -1
- package/dist/{compile-EzEMB-7v.js → compile-B_oJqmIg.js} +4 -4
- package/dist/{compile-BEklRUYo.d.ts → compile-BxiwRotu.d.ts} +2 -2
- package/dist/{completion--Y4YItFZ.js → completion-pwVjJlek.js} +3 -3
- package/dist/{config-CcLlvEYW.js → config-COHmivz9.js} +4 -4
- package/dist/{config-BQ77xMZk.js → config-DnfH6_eT.js} +2 -2
- package/dist/{config-report-DVMOLJ7F.js → config-report-C1jl7Na-.js} +2 -2
- package/dist/{context-BnIzxTNE.js → context-DeammvFl.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +3 -3
- package/dist/{core-CFepFiDP.d.ts → core-0iYZ5HUx.d.ts} +2 -2
- package/dist/{core-lxoANyai.js → core-W5f4Rjt0.js} +7 -7
- package/dist/{create-DBvUsgzK.d.ts → create-DNN3OtsO.d.ts} +4 -4
- package/dist/{create-CDd9c22W.d.ts → create-DrHUmKvG.d.ts} +6 -6
- package/dist/{create-BPUopdfL.d.ts → create-bzQlBzG4.d.ts} +7 -7
- package/dist/{create-Coq5fIrq.js → create-gqtDb1nU.js} +5 -5
- package/dist/{create-BLPKnJKa.js → create-jCPwPWXf.js} +6 -5
- package/dist/{credential-CyyyvCsL.js → credential-B3Hj4puZ.js} +4 -3
- package/dist/{credentials-CdDxp7jN.js → credentials-dkycUsY3.js} +1 -1
- package/dist/decision-CaG5_eNJ.js +21 -0
- package/dist/{delegation-CDB6_keF.js → delegation-aK4T_5WU.js} +3 -3
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-DHldhVUv.d.ts → denied-text-DyzWwxEB.d.ts} +1 -1
- package/dist/{describe-Bb4hGK5d.js → describe-CogP1loh.js} +2 -1
- package/dist/{describe-BbFPBSms.d.ts → describe-nalX_HHE.d.ts} +1 -1
- package/dist/{diff-DfmYaIhB.js → diff-BTsLiW59.js} +7 -7
- package/dist/{diff-CxtbOi2l.js → diff-CcxYooMu.js} +2 -2
- package/dist/{doctor-CwYc2lJb.js → doctor-BNRhJegR.js} +3 -3
- package/dist/{doctor-D1Xnmy6u.js → doctor-DS-9ApID.js} +195 -30
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/drizzle/index.js +1 -1
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-Vpu6rKHl.js → errors-BhRkoNS7.js} +0 -2
- package/dist/{errors-BIM4MFsJ.d.ts → errors-Dc9FdamT.d.ts} +1 -1
- package/dist/{evaluate-BAmf_AQd.js → evaluate-CsjXeLRo.js} +18 -15
- package/dist/{evaluations-DOWuBpWv.d.ts → evaluations-BasA9zXp.d.ts} +3 -3
- package/dist/{evaluations-IBceAeKT.js → evaluations-DG40eSJa.js} +3 -22
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +3 -3
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +3 -3
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +3 -3
- package/dist/{fetch-adapter-BIbBAtPZ.d.ts → fetch-adapter-BgqpOOpd.d.ts} +2 -2
- package/dist/{fetch-adapter-dPTgJVHd.js → fetch-adapter-UZOW0PRC.js} +2 -2
- package/dist/{fields-DI8s3cPl.js → fields-CrjL6A49.js} +3 -3
- package/dist/{files-B3AA05f1.js → files-CfiRtQ-m.js} +1 -1
- package/dist/{fixtures-Bm4_K1ke.js → fixtures-0VTW5oNq.js} +2 -2
- package/dist/{flags-DXjoTVbS.js → flags-BlmpmXoY.js} +2 -2
- package/dist/{from-snapshot-DCakWRsr.js → from-snapshot-DMlSSo9b.js} +14 -12
- package/dist/{gen-DwgCSC6V.js → gen-CNCzG4sB.js} +2 -2
- package/dist/{gen-DuAhghDw.js → gen-DnpZwQPo.js} +9 -9
- package/dist/{generate-CRVV5V7l.js → generate-BqkZq8Dr.js} +2 -2
- package/dist/{grantee-conditions-BrYPe-w0.js → grantee-conditions-DX4K_gGI.js} +1 -1
- package/dist/{grantee-match-7RZZvoT_.js → grantee-match-BP-k4vRJ.js} +2 -2
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-DJicaG6f.js → helpers-DNnZffrI.js} +76 -12
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DVxlLZMe.d.ts → hosted-DxRLLiFU.d.ts} +1 -1
- package/dist/{hosted-D0IzESu_.js → hosted-tPZnyjQS.js} +12 -10
- package/dist/{http-DOL33cO0.js → http-DhMWeB_h.js} +1 -1
- package/dist/{import-Dfe2unKO.js → import-BYVbSKx0.js} +3 -3
- package/dist/{import-CNBF96hB.js → import-C1XXpG_m.js} +4 -4
- package/dist/{index-Cay5-Kvx.d.ts → index-Bt-UoBWu.d.ts} +11 -10
- package/dist/{index-DJwEgYzA.d.ts → index-CXXUFWtG.d.ts} +17 -11
- package/dist/{index-Dj2qF9VC.d.ts → index-CZ5mixHO.d.ts} +1 -1
- package/dist/{index-ymept53A.d.ts → index-DFwUOkvt.d.ts} +4 -4
- package/dist/{index-CV-7DWeD.d.ts → index-DtGtDzjb.d.ts} +4 -4
- package/dist/{index-BinlXeU-.d.ts → index-z44pfWar.d.ts} +2 -2
- package/dist/index.d.ts +18 -16
- package/dist/index.js +20 -18
- package/dist/{init-C6cWP3xW.js → init-Dr1qAStu.js} +5 -5
- package/dist/{init-BUo2G-FI.js → init-YSDySeMy.js} +5 -5
- package/dist/{instance-options-CoHn-0e8.d.ts → instance-options-BOCRxEFb.d.ts} +2 -2
- package/dist/{instance-snapshot-DuWf1cT3.js → instance-snapshot-BgOGtyCy.js} +15 -12
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +3 -3
- package/dist/{kernel-BD8QuMnv.js → kernel-CDDU93dI.js} +10 -10
- package/dist/kysely/index.d.ts +3 -3
- package/dist/kysely/index.js +1 -1
- package/dist/{load-DjSU5KXO.js → load-BaEamml-.js} +1 -1
- package/dist/load-CjnlPxpL.js +1 -0
- package/dist/{login-D1MHOomI.js → login-CXgEKLaW.js} +4 -4
- package/dist/{login-DCKE5pVy.js → login-DEVXDTX8.js} +4 -4
- package/dist/{manifest-Cft51TLK.js → manifest-Dij1U0hx.js} +37 -37
- package/dist/{map-claims-C-nv08_n.js → map-claims-PQwHynxV.js} +25 -11
- package/dist/{map-error-pasIGqMT.js → map-error-B_f3C5cs.js} +1 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +9 -9
- package/dist/{migrate-BJHxQqT5.js → migrate-BbY5-Khy.js} +4 -4
- package/dist/{module-values-B1EVTkHP.js → module-values-B8tNIxdd.js} +2 -2
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +32 -13
- package/dist/next/index.js +43 -25
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +2 -2
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +2 -2
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-BwWkHxvW.js → openapi-D3wkvOoU.js} +4 -4
- package/dist/{openapi-DSzQN7Zu.js → openapi-GM-kTdkq.js} +5 -5
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +3 -3
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +1 -1
- package/dist/{output-DlICTjBh.js → output-DhTpe8v1.js} +1 -1
- package/dist/output-files-BYscrQl-.js +1 -0
- package/dist/{output-files-BIQ_9pIs.js → output-files-CM0BnH05.js} +1 -1
- package/dist/{ownership-qqBuGJXr.js → ownership-moSRhxl_.js} +6 -6
- package/dist/{parse-1_ZheTW5.js → parse-UTC-sDrt.js} +2 -2
- package/dist/{parse-local-manifest-CCmbhnxP.d.ts → parse-local-manifest-BgTYdR3q.d.ts} +1 -1
- package/dist/{parse-request-CwCZpyjV.js → parse-request-DOBVaeiQ.js} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +3 -3
- package/dist/{peer-Q0fuZ6hx.js → peer-BuK9F53f.js} +1 -1
- package/dist/{peer-C9LvBCcb.js → peer-n-swIV4H.js} +1 -1
- package/dist/{permdock-CprAPN3w.d.ts → permdock-DUWZEOLR.d.ts} +88 -131
- package/dist/{permdock-BvjivVb9.js → permdock-DdzMv5-F.js} +195 -102
- package/dist/{permissions-CYcHj_w7.js → permissions-CvpPtz5O.js} +1 -1
- package/dist/{pg-DQTqRrou.js → pg-Ddxsd5ZB.js} +2 -2
- package/dist/{policy-BycVKnXv.d.ts → policy-CTNl7pvN.d.ts} +1 -1
- package/dist/{policy-CLQ8__GF.js → policy-DxQyHKPB.js} +5 -4
- package/dist/{policy-from-catalog-CU3An8uP.js → policy-from-catalog-DVa1faOr.js} +8 -7
- package/dist/{policy-types-DGIO_gxq.d.ts → policy-types-IRJVABmm.d.ts} +63 -19
- package/dist/{postgrest-D5nUGm-c.d.ts → postgrest-B_cEDd4e.d.ts} +12 -7
- package/dist/{postgrest-DAxFltvO.js → postgrest-BrjrckDG.js} +74 -19
- package/dist/{powersync-DAfo0EL5.js → powersync-BZxw_v-A.js} +3 -3
- package/dist/{powersync-CBhTBhG2.js → powersync-C0nsyULQ.js} +15 -15
- package/dist/powersync-Cqzx25dI.js +1 -0
- package/dist/preset/index.js +1 -1
- package/dist/{preset-BjLzeFpp.js → preset-pPrVyGU5.js} +74 -7
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.js +1 -1
- package/dist/{protected-action-DUYqb-Ma.js → protected-action-B6n6w7Rl.js} +1 -1
- package/dist/{protected-action-D8x73IGm.d.ts → protected-action-D3S9U4nc.d.ts} +14 -7
- package/dist/{protected-action-QEA8arRB.js → protected-action-qowj6nxN.js} +15 -5
- package/dist/{provider-C55OGXJ7.js → provider-CY4TSSJo.js} +2 -2
- package/dist/{provider-DfLeek9O.d.ts → provider-CjAu39fJ.d.ts} +1 -1
- package/dist/{provider-store-CaTv00tr.js → provider-store-BQP_pp8s.js} +2 -2
- package/dist/pull-CUVdB04v.js +1 -0
- package/dist/{pull-CQCGy1gv.js → pull-DVoZ0V9_.js} +6 -6
- package/dist/{push-Dq_ca4-j.js → push-eJl1Tvqm.js} +7 -7
- package/dist/{pushed-policy-CryQheKq.d.ts → pushed-policy-CUQuvlS3.d.ts} +1 -1
- package/dist/{pushed-policy-CDuOL2de.js → pushed-policy-DMXAOmEW.js} +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/index.js +6 -6
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +10 -10
- package/dist/react-native/index.js +9 -9
- package/dist/refresh-on-L9UOwATg.d.ts +49 -0
- package/dist/{replay-Bs9Df2fQ.d.ts → replay-Dc3d8LhG.d.ts} +1 -1
- package/dist/{request-context-Duzdf0cd.js → request-context-Ch052blg.js} +2 -2
- package/dist/{request-schema-DhX7UbfQ.js → request-schema-CMP8Cmxd.js} +5 -0
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-Y1Cb22cp.js → resolve-names-1nCei24V.js} +6 -6
- package/dist/{rls-C5ZGzR_B.js → rls-BVzoZCn3.js} +4 -4
- package/dist/{rls-tHu7N_Pe.js → rls-ClJRblnR.js} +19 -19
- package/dist/{role-builder-BK2-T6oD.js → role-builder-BrmOcXch.js} +3 -157
- package/dist/{rpc-vHIwyXCp.js → rpc-BOu3FD6X.js} +2 -2
- package/dist/{run-DUq1xU4K.js → run-CnCaTjWX.js} +8 -40
- package/dist/run-D9N6V5WQ.js +1 -0
- package/dist/{run-ticket-ylovhyFQ.d.ts → run-ticket-C6lXvHM_.d.ts} +2 -2
- package/dist/{run-ticket-DfnZCh-u.js → run-ticket-CjvXr6wj.js} +1 -1
- package/dist/{runtime-BGnrOkVH.js → runtime-CBXkOcg9.js} +1 -1
- package/dist/{saas-DK4V-3Is.js → saas-BqM9mJkk.js} +13 -10
- package/dist/{scan-C3HRH9Fs.js → scan-CepUXrFt.js} +1 -1
- package/dist/{schema-DvXvxPhQ.js → schema-9_NDz8fx.js} +1 -1
- package/dist/{schema-BOJjqlWL.js → schema-CuX70xgH.js} +15 -2
- package/dist/scim/index.d.ts +1 -1
- package/dist/scim/index.js +1 -1
- package/dist/{scim-jJBJ7g1Z.js → scim-C30QBBoF.js} +2 -1
- package/dist/{scim-D8YupzX1.js → scim-CovliQUg.js} +2 -2
- package/dist/{scopes-0Up_UA2t.js → scopes-BSdYaGHs.js} +9 -40
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +8 -8
- package/dist/{server-3cVlTLde.js → server-D0PW6ZCw.js} +2 -2
- package/dist/{server-types-CyRN0-Cd.d.ts → server-types-Bw-lWqzR.d.ts} +8 -8
- package/dist/{shared-l0oGGetg.js → shared-BRmCJxDK.js} +2 -2
- package/dist/{shared-DrGLwM3s.js → shared-DyYVEjKC.js} +2 -2
- package/dist/{sink-B5zoUW_O.d.ts → sink-DUzt0e4B.d.ts} +2 -2
- package/dist/{skills-Celu2W6v.js → skills-BUuH-QFt.js} +2 -2
- package/dist/{skills-B2qTbaQa.js → skills-a4N6Y2Xm.js} +2 -2
- package/dist/{snapshot-CXlzi69u.js → snapshot-DN_8J27z.js} +6 -2
- package/dist/{snapshot-cache-Bx_4xC_6.js → snapshot-cache-B66h7FBK.js} +25 -8
- package/dist/{snapshot-cache-BjAWkchD.d.ts → snapshot-cache-Dbk-Gnij.d.ts} +20 -6
- package/dist/solid/index.d.ts +7 -7
- package/dist/solid/index.js +6 -6
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-oB1Hg1Fm.d.ts → sources-CXY05xtB.d.ts} +1 -1
- package/dist/{src-C_pi2Rnh.js → src-nYNBfmgq.js} +187 -39
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +1 -1
- package/dist/{standard-webhooks-DOYEuOLx.d.ts → standard-webhooks-BFeEpjxy.d.ts} +2 -2
- package/dist/{store-RNFvaJJv.js → store-XgBMbfDy.js} +13 -7
- package/dist/{types-tQB2CEnY.d.ts → store-g5ctUrOI.d.ts} +114 -113
- package/dist/{store-options-Dil3lraY.js → store-options--zWn48PK.js} +76 -7
- package/dist/{stores-DxZWDXCs.js → stores-53_kOwPi.js} +3 -3
- package/dist/{stores-DZJvxFIZ.d.ts → stores-BtdN3eDO.d.ts} +5 -6
- package/dist/{stream-9y9qw51m.d.ts → stream-BMJg56jU.d.ts} +1 -1
- package/dist/{subject-BGoM5o8B.js → subject-C7RddW0G.js} +8 -1
- package/dist/supabase/client.d.ts +31 -0
- package/dist/supabase/client.js +21 -0
- package/dist/supabase/index.d.ts +37 -6
- package/dist/supabase/index.js +5 -4
- package/dist/supabase/middleware.d.ts +8 -7
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-DYWnT800.js → supabase-C6FyUeSh.js} +3 -3
- package/dist/{supabase-CDHMsDD0.js → supabase-C8cNzp4i.js} +31 -8
- package/dist/supabase-hook-CPBX4dy5.js +1 -0
- package/dist/{supabase-hook-HPgwYb9V.js → supabase-hook-Cj85nccs.js} +167 -21
- package/dist/{supautils-SwE642N1.js → supautils-BP_5WAIc.js} +12 -12
- package/dist/svelte/index.d.ts +7 -7
- package/dist/svelte/index.js +8 -8
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +3 -3
- package/dist/svelte/source.d.ts +7 -7
- package/dist/svelte/source.js +5 -5
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-DimBcVWY.js → tables-BsGE6HBR.js} +7 -7
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenancy-5d1zVBvK.js → tenancy-DvOHHk3-.js} +1 -1
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +6 -6
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/index.d.ts +29 -22
- package/dist/testing/index.js +118 -46
- package/dist/testing/saas/index.d.ts +3 -3
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/token-D6pWn8Uj.d.ts +11 -0
- package/dist/{token-DC9EQiet.js → token-DaMnIU9O.js} +24 -8
- package/dist/{tool-refusal-Qpjs_W6M.js → tool-refusal-C1UlhU0V.js} +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +3 -3
- package/dist/{type-helpers-c7Xo_2Cu.d.ts → type-helpers-C_OnZW8c.d.ts} +1 -1
- package/dist/{types-B2efzoSX.d.ts → types-AOP5HQku.d.ts} +1 -1
- package/dist/{types-DlelvQk4.d.ts → types-B3BOcI0J.d.ts} +2 -2
- package/dist/{types-DLvhVm1r.d.ts → types-BvBbkAu1.d.ts} +16 -7
- package/dist/{types-BB-zWDcR.d.ts → types-CA-A33Q5.d.ts} +5 -5
- package/dist/{types-Cklw5hJo.d.ts → types-CAAN7evk.d.ts} +24 -1
- package/dist/{types-DsHGPtkR.d.ts → types-CJC1aaoJ.d.ts} +2 -2
- package/dist/{types-CWBsAwqn.d.ts → types-D29K5ZNP.d.ts} +4 -4
- package/dist/{types-CEinc15V.d.ts → types-DVZNTkU0.d.ts} +3 -4
- package/dist/{types-ZzRGoViD.d.ts → types-NYoj8JBm.d.ts} +2 -2
- package/dist/{types-B6ExllNo.d.ts → types-Sj1U8HMm.d.ts} +2 -2
- package/dist/{types-CN0LsqbK.d.ts → types-UfpcY575.d.ts} +3 -3
- package/dist/{types-rCRV4Ge-.d.ts → types-e82uzrTn.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +2 -2
- package/dist/{usage-CPXeuAdT.js → usage-COsGLht5.js} +6 -6
- package/dist/{usage-CfZCQd0F.js → usage-CqcMeQgX.js} +2 -2
- package/dist/usage-D1cpHO7p.js +1 -0
- package/dist/{validation-error-uvp-kyfO.d.ts → validation-error-DpvsBwZJ.d.ts} +1 -1
- package/dist/{verify-DfT0QYNh.js → verify-C8G8D5mk.js} +19 -19
- package/dist/{version-cache-Df11C2Qp.d.ts → version-cache-9Vq5QVFC.d.ts} +9 -3
- package/dist/{views-CD8wuL4Z.js → views-TrZYlDnM.js} +1 -1
- package/dist/vue/index.d.ts +7 -7
- package/dist/vue/index.js +6 -6
- package/dist/{waiter-CqUKX6CY.d.ts → waiter-C2cXXLFZ.d.ts} +2 -2
- package/dist/{watch-DAkjm75Y.js → watch-DXRDBSCu.js} +3 -3
- package/dist/watch-DnymTAfe.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/{where-scope-DlCdCM_8.js → where-scope-BKrqUDVk.js} +5 -5
- package/dist/{who-can-BoDJm0Nc.js → who-can-BY5d3HPw.js} +4 -4
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +5 -4
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-B2wziJI_.js → wrap-C5PWzgkq.js} +1 -1
- package/dist/{wrap-DxXB54Wu.d.ts → wrap-DpZAbxuD.d.ts} +2 -2
- package/package.json +8 -5
- package/schemas/approval-request-v1.json +5 -0
- package/schemas/catalog-v1.json +18 -2
- package/schemas/cli-result-v1.json +0 -2
- package/schemas/snapshot-v1.json +9 -0
- package/skills/permdock-approvals/SKILL.md +8 -8
- package/skills/permdock-approvals/references/stores-and-resume.md +7 -3
- package/skills/permdock-audit/SKILL.md +1 -1
- package/dist/action-result-BcudBQOF.d.ts +0 -19
- package/dist/catalog-D3oS2GH3.js +0 -1
- package/dist/collect-D-eroIfV.js +0 -1
- package/dist/load-Dm0pSYH3.js +0 -1
- package/dist/output-files-BHOIlrfD.js +0 -1
- package/dist/powersync-0QVP_DuR.js +0 -1
- package/dist/pull-CCAChKuy.js +0 -1
- package/dist/renames-CGj7YwcQ.js +0 -175
- package/dist/run-C5P3x1EI.js +0 -1
- package/dist/supabase-hook-qsewAVZY.js +0 -1
- package/dist/usage-DmmO_xjJ.js +0 -1
- package/dist/watch-CuPz0D2M.js +0 -1
|
@@ -1,12 +1,185 @@
|
|
|
1
|
-
import { n as CliError } from "./errors-
|
|
1
|
+
import { n as CliError } from "./errors-BhRkoNS7.js";
|
|
2
2
|
import { a as rel } from "./files-BSjrtIHw.js";
|
|
3
3
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
4
|
-
import { n as ROOT } from "./manifest-
|
|
5
|
-
import { i as
|
|
6
|
-
import { i as refuseDirty, t as applyFiles } from "./files-B3AA05f1.js";
|
|
4
|
+
import { n as ROOT } from "./manifest-Dij1U0hx.js";
|
|
5
|
+
import { i as refuseDirty, t as applyFiles } from "./files-CfiRtQ-m.js";
|
|
7
6
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
8
7
|
import { basename, extname, join, resolve } from "node:path";
|
|
9
8
|
import { Visitor, parseSync, visitorKeys } from "oxc-parser";
|
|
9
|
+
//#region src/cli/codemod/cli-renames-0.5.ts
|
|
10
|
+
const DB_COMMANDS = [
|
|
11
|
+
"rls generate",
|
|
12
|
+
"rls import",
|
|
13
|
+
"rls verify",
|
|
14
|
+
"supabase hook generate",
|
|
15
|
+
"powersync verify"
|
|
16
|
+
];
|
|
17
|
+
const FLAG_RENAMES = [
|
|
18
|
+
{
|
|
19
|
+
commands: DB_COMMANDS,
|
|
20
|
+
from: "--db",
|
|
21
|
+
to: "--db-url-stdin",
|
|
22
|
+
hint: "--db-url-stdin or DATABASE_URL"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
commands: DB_COMMANDS,
|
|
26
|
+
from: "--db-url",
|
|
27
|
+
to: "--db-url-stdin",
|
|
28
|
+
hint: "--db-url-stdin or DATABASE_URL"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
commands: ["rls generate"],
|
|
32
|
+
from: "--force",
|
|
33
|
+
to: "--force-rls"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
commands: ["rls verify"],
|
|
37
|
+
from: "--format",
|
|
38
|
+
to: "--kind"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
commands: ["rls verify"],
|
|
42
|
+
from: "--emit",
|
|
43
|
+
to: "--kind"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
commands: ["catalog"],
|
|
47
|
+
from: "--format",
|
|
48
|
+
to: "--kind",
|
|
49
|
+
values: {
|
|
50
|
+
json: "catalog",
|
|
51
|
+
schema: "json-schema",
|
|
52
|
+
markdown: "markdown"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
commands: ["openapi emit"],
|
|
57
|
+
from: "--format",
|
|
58
|
+
to: "--kind"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
commands: [
|
|
62
|
+
"rls generate",
|
|
63
|
+
"rls verify",
|
|
64
|
+
"rls migrate",
|
|
65
|
+
"powersync generate",
|
|
66
|
+
"powersync verify",
|
|
67
|
+
"openapi emit"
|
|
68
|
+
],
|
|
69
|
+
from: "--from",
|
|
70
|
+
to: "--policy"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
commands: ["catalog", "arazzo check"],
|
|
74
|
+
from: "--from",
|
|
75
|
+
to: "--permissions"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
commands: ["rls import", "openapi import"],
|
|
79
|
+
from: "--schema",
|
|
80
|
+
to: "--validator"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
commands: [
|
|
84
|
+
"usage",
|
|
85
|
+
"config",
|
|
86
|
+
"doctor"
|
|
87
|
+
],
|
|
88
|
+
from: "--strict",
|
|
89
|
+
to: "--fail-on",
|
|
90
|
+
hint: "--fail-on warning",
|
|
91
|
+
rewrite: "--fail-on warning"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
commands: ["login"],
|
|
95
|
+
from: "--write",
|
|
96
|
+
to: "--scope",
|
|
97
|
+
hint: "--scope catalog:write",
|
|
98
|
+
rewrite: "--scope catalog:write"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
commands: ["skills install", "skills update"],
|
|
102
|
+
from: "--agent",
|
|
103
|
+
to: "--for"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
commands: ["skills install", "skills update"],
|
|
107
|
+
from: "--client",
|
|
108
|
+
to: "--for"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
commands: ["init"],
|
|
112
|
+
from: "--agent",
|
|
113
|
+
to: "--integration"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
commands: ["init"],
|
|
117
|
+
from: "--ui",
|
|
118
|
+
to: "--integration"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
commands: ["init"],
|
|
122
|
+
from: "--src",
|
|
123
|
+
to: "--out-dir"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
commands: [
|
|
127
|
+
"rls generate",
|
|
128
|
+
"rls verify",
|
|
129
|
+
"rls migrate"
|
|
130
|
+
],
|
|
131
|
+
from: "--rbac-scaffold",
|
|
132
|
+
to: "--rbac",
|
|
133
|
+
hint: "--rbac supabase",
|
|
134
|
+
rewrite: "--rbac supabase"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
commands: ["rls migrate"],
|
|
138
|
+
from: "--write",
|
|
139
|
+
hint: "rls migrate writes by default; --dry-run prints the plan without writing",
|
|
140
|
+
rewrite: ""
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
commands: ["cloud push"],
|
|
144
|
+
from: "--environment",
|
|
145
|
+
to: "--project",
|
|
146
|
+
hint: "--project <id>: a project id is its environment"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
commands: ["scan"],
|
|
150
|
+
from: "--legacy",
|
|
151
|
+
hint: "permdock scan lists the checks written without PermDock; drop --legacy",
|
|
152
|
+
rewrite: ""
|
|
153
|
+
}
|
|
154
|
+
];
|
|
155
|
+
const COMMAND_MOVES = [
|
|
156
|
+
{
|
|
157
|
+
from: "openapi",
|
|
158
|
+
to: "openapi emit"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
from: "skills",
|
|
162
|
+
to: "skills install"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
from: "arazzo",
|
|
166
|
+
to: "arazzo check"
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
const DEFAULT_CHANGES = [{
|
|
170
|
+
command: "rls migrate",
|
|
171
|
+
unless: ["--write", "--retire-out"],
|
|
172
|
+
add: "--dry-run"
|
|
173
|
+
}];
|
|
174
|
+
/** The rename that matches `flag` (as typed, before any `=`) on `command`. */
|
|
175
|
+
function flagRename(command, flag) {
|
|
176
|
+
return FLAG_RENAMES.find((rename) => rename.from === flag && rename.commands.includes(command));
|
|
177
|
+
}
|
|
178
|
+
function renameMessage(command, rename) {
|
|
179
|
+
const replacement = rename.hint ?? rename.to;
|
|
180
|
+
return replacement === void 0 ? `${command}: ${rename.from} was removed in 0.5.0.` : rename.to === void 0 ? `${command}: ${rename.from} was removed in 0.5.0: ${replacement}.` : `${command}: ${rename.from} is ${replacement} since 0.5.0.`;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
10
183
|
//#region src/cli/codemod/cli-calls.ts
|
|
11
184
|
/**
|
|
12
185
|
* `permdock`, `npx permdock@0.4`, `pnpm exec permdock`: the bin name followed
|
|
@@ -66,8 +239,7 @@ function flagEdits(command, tokens, notes) {
|
|
|
66
239
|
for (const [index, token] of tokens.entries()) {
|
|
67
240
|
if (!token.text.startsWith("--")) continue;
|
|
68
241
|
const eq = token.text.indexOf("=");
|
|
69
|
-
const
|
|
70
|
-
const rename = flagRename(command, name);
|
|
242
|
+
const rename = flagRename(command, eq === -1 ? token.text : token.text.slice(0, eq));
|
|
71
243
|
if (rename === void 0) continue;
|
|
72
244
|
const edit = flagEdit(rename, token, eq, tokens[index + 1]);
|
|
73
245
|
if (edit === void 0) notes.push({
|
|
@@ -1380,6 +1552,206 @@ const DURATION_KEYS_0_5 = Object.freeze({
|
|
|
1380
1552
|
lists: ["durations"]
|
|
1381
1553
|
});
|
|
1382
1554
|
//#endregion
|
|
1555
|
+
//#region src/cli/codemod/shapes-0.17.ts
|
|
1556
|
+
const COMBINATORS = /* @__PURE__ */ new Set([
|
|
1557
|
+
"any",
|
|
1558
|
+
"all",
|
|
1559
|
+
"sequential"
|
|
1560
|
+
]);
|
|
1561
|
+
/** The keys a 0.16 membership literal may carry. */
|
|
1562
|
+
const MEMBERSHIP_KEYS = /* @__PURE__ */ new Set([
|
|
1563
|
+
"tenant",
|
|
1564
|
+
"team",
|
|
1565
|
+
"roles",
|
|
1566
|
+
"eligible",
|
|
1567
|
+
"via",
|
|
1568
|
+
"expiresAt",
|
|
1569
|
+
"grantedBy",
|
|
1570
|
+
"reason",
|
|
1571
|
+
"member",
|
|
1572
|
+
"managedBy",
|
|
1573
|
+
"entitlements",
|
|
1574
|
+
"keep",
|
|
1575
|
+
"x"
|
|
1576
|
+
]);
|
|
1577
|
+
function keyed(object) {
|
|
1578
|
+
const out = [];
|
|
1579
|
+
for (const property of object.properties) {
|
|
1580
|
+
if (property.type !== "Property" || property.computed) continue;
|
|
1581
|
+
const { key } = property;
|
|
1582
|
+
if (key.type === "Identifier") out.push({
|
|
1583
|
+
key: key.name,
|
|
1584
|
+
property
|
|
1585
|
+
});
|
|
1586
|
+
else if (key.type === "Literal" && typeof key.value === "string") out.push({
|
|
1587
|
+
key: key.value,
|
|
1588
|
+
property
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
return out;
|
|
1592
|
+
}
|
|
1593
|
+
function stringLiteral(property) {
|
|
1594
|
+
const { value } = property;
|
|
1595
|
+
return value.type === "Literal" && typeof value.value === "string" ? value.value : void 0;
|
|
1596
|
+
}
|
|
1597
|
+
function langOf(file) {
|
|
1598
|
+
if (file.endsWith(".tsx")) return "tsx";
|
|
1599
|
+
if (file.endsWith(".jsx")) return "jsx";
|
|
1600
|
+
return /\.[cm]?ts$/u.test(file) ? "ts" : "js";
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* The span of `property` with the comma after it, or the comma before it when
|
|
1604
|
+
* it is the last property, so removing the span leaves the object well formed.
|
|
1605
|
+
*/
|
|
1606
|
+
function withComma(source, property) {
|
|
1607
|
+
const after = /^\s*,\s*/u.exec(source.slice(property.end));
|
|
1608
|
+
if (after !== null) return {
|
|
1609
|
+
start: property.start,
|
|
1610
|
+
end: property.end + after[0].length
|
|
1611
|
+
};
|
|
1612
|
+
const before = /,\s*$/u.exec(source.slice(0, property.start));
|
|
1613
|
+
return {
|
|
1614
|
+
start: property.start - (before?.[0].length ?? 0),
|
|
1615
|
+
end: property.end
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* 0.17's object-literal rewrites:
|
|
1620
|
+
*
|
|
1621
|
+
* - A membership `{ tenant, team?, roles }` becomes `{ scope, id, within? }`
|
|
1622
|
+
* under the `tenant` and `team` scope aliases. Only an object whose keys are
|
|
1623
|
+
* all membership fields counts, so credentials, events and principals that
|
|
1624
|
+
* carry `tenant` and `roles` stay as they are.
|
|
1625
|
+
* - An approval option's `mode: 'any' | 'all' | 'sequential'` becomes `combine`,
|
|
1626
|
+
* `distinct: false` becomes `mode: 'confirm'`, and `distinct: true` (the
|
|
1627
|
+
* default) goes.
|
|
1628
|
+
*
|
|
1629
|
+
* A `distinct` that is not a literal and every `ApprovalMode` type reference
|
|
1630
|
+
* are follow-ups.
|
|
1631
|
+
*/
|
|
1632
|
+
function rewriteLiterals017(file, source) {
|
|
1633
|
+
let parsed;
|
|
1634
|
+
try {
|
|
1635
|
+
parsed = parseSync(file, source, {
|
|
1636
|
+
lang: langOf(file),
|
|
1637
|
+
sourceType: "module"
|
|
1638
|
+
});
|
|
1639
|
+
} catch {
|
|
1640
|
+
return {
|
|
1641
|
+
source,
|
|
1642
|
+
changes: [],
|
|
1643
|
+
followUps: []
|
|
1644
|
+
};
|
|
1645
|
+
}
|
|
1646
|
+
if (parsed.errors.length > 0) return {
|
|
1647
|
+
source,
|
|
1648
|
+
changes: [],
|
|
1649
|
+
followUps: []
|
|
1650
|
+
};
|
|
1651
|
+
const lineAt = lineIndex(source);
|
|
1652
|
+
const edits = [];
|
|
1653
|
+
const changes = [];
|
|
1654
|
+
const followUps = [];
|
|
1655
|
+
const text = (node) => source.slice(node.start, node.end);
|
|
1656
|
+
const change = (at, from, to) => {
|
|
1657
|
+
changes.push({
|
|
1658
|
+
...position(lineAt, at),
|
|
1659
|
+
from,
|
|
1660
|
+
to
|
|
1661
|
+
});
|
|
1662
|
+
};
|
|
1663
|
+
const membership = (node, props) => {
|
|
1664
|
+
const keys = new Set(props.map((item) => item.key));
|
|
1665
|
+
if (props.length !== node.properties.length || !keys.has("roles") || !keys.has("tenant") && !keys.has("team") || [...keys].some((key) => !MEMBERSHIP_KEYS.has(key))) return;
|
|
1666
|
+
const tenant = props.find((item) => item.key === "tenant")?.property;
|
|
1667
|
+
const team = props.find((item) => item.key === "team")?.property;
|
|
1668
|
+
if ([tenant, team].some((item) => item?.value.type === "ObjectExpression" || item?.value.type === "ArrayExpression")) return;
|
|
1669
|
+
if (team === void 0 && tenant !== void 0) {
|
|
1670
|
+
const to = `scope: "tenant", id: ${text(tenant.value)}`;
|
|
1671
|
+
edits.push({
|
|
1672
|
+
start: tenant.start,
|
|
1673
|
+
end: tenant.end,
|
|
1674
|
+
text: to
|
|
1675
|
+
});
|
|
1676
|
+
change(tenant.start, text(tenant), to);
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
if (team !== void 0) {
|
|
1680
|
+
const to = `scope: "team", id: ${text(team.value)}`;
|
|
1681
|
+
edits.push({
|
|
1682
|
+
start: team.start,
|
|
1683
|
+
end: team.end,
|
|
1684
|
+
text: to
|
|
1685
|
+
});
|
|
1686
|
+
change(team.start, text(team), to);
|
|
1687
|
+
}
|
|
1688
|
+
if (tenant !== void 0) {
|
|
1689
|
+
const value = text(tenant.value);
|
|
1690
|
+
const to = `within: { ${value === "tenant" ? value : `tenant: ${value}`} }`;
|
|
1691
|
+
edits.push({
|
|
1692
|
+
start: tenant.start,
|
|
1693
|
+
end: tenant.end,
|
|
1694
|
+
text: to
|
|
1695
|
+
});
|
|
1696
|
+
change(tenant.start, text(tenant), to);
|
|
1697
|
+
}
|
|
1698
|
+
};
|
|
1699
|
+
const approval = (props) => {
|
|
1700
|
+
const keys = new Set(props.map((item) => item.key));
|
|
1701
|
+
if (!keys.has("by") && !keys.has("stages")) return;
|
|
1702
|
+
const mode = props.find((item) => item.key === "mode")?.property;
|
|
1703
|
+
const value = mode === void 0 ? void 0 : stringLiteral(mode);
|
|
1704
|
+
if (mode !== void 0 && value !== void 0 && COMBINATORS.has(value)) {
|
|
1705
|
+
edits.push({
|
|
1706
|
+
start: mode.key.start,
|
|
1707
|
+
end: mode.key.end,
|
|
1708
|
+
text: "combine"
|
|
1709
|
+
});
|
|
1710
|
+
change(mode.start, text(mode), `combine: ${text(mode.value)}`);
|
|
1711
|
+
}
|
|
1712
|
+
const distinct = props.find((item) => item.key === "distinct")?.property;
|
|
1713
|
+
if (distinct === void 0) return;
|
|
1714
|
+
const literal = distinct.value;
|
|
1715
|
+
if (literal.type === "Literal" && literal.value === false) {
|
|
1716
|
+
edits.push({
|
|
1717
|
+
start: distinct.start,
|
|
1718
|
+
end: distinct.end,
|
|
1719
|
+
text: "mode: \"confirm\""
|
|
1720
|
+
});
|
|
1721
|
+
change(distinct.start, text(distinct), "mode: \"confirm\"");
|
|
1722
|
+
} else if (literal.type === "Literal" && literal.value === true) {
|
|
1723
|
+
edits.push({
|
|
1724
|
+
...withComma(source, distinct),
|
|
1725
|
+
text: ""
|
|
1726
|
+
});
|
|
1727
|
+
change(distinct.start, text(distinct), "(removed: authorize is the default)");
|
|
1728
|
+
} else followUps.push({
|
|
1729
|
+
...position(lineAt, distinct.start),
|
|
1730
|
+
name: "distinct",
|
|
1731
|
+
message: "distinct is gone since 0.17.0: `mode: \"confirm\"` where it was false; drop it where it was true"
|
|
1732
|
+
});
|
|
1733
|
+
};
|
|
1734
|
+
new Visitor({
|
|
1735
|
+
ObjectExpression(node) {
|
|
1736
|
+
const props = keyed(node);
|
|
1737
|
+
membership(node, props);
|
|
1738
|
+
approval(props);
|
|
1739
|
+
},
|
|
1740
|
+
TSTypeReference(node) {
|
|
1741
|
+
if (node.typeName.type === "Identifier" && node.typeName.name === "ApprovalMode") followUps.push({
|
|
1742
|
+
...position(lineAt, node.start),
|
|
1743
|
+
name: "ApprovalMode",
|
|
1744
|
+
message: "ApprovalMode is `'confirm' | 'authorize'` since 0.17.0; the stage combinator type is ApprovalCombine"
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
}).visit(parsed.program);
|
|
1748
|
+
return {
|
|
1749
|
+
source: applyEdits(source, edits),
|
|
1750
|
+
changes,
|
|
1751
|
+
followUps
|
|
1752
|
+
};
|
|
1753
|
+
}
|
|
1754
|
+
//#endregion
|
|
1383
1755
|
//#region src/cli/codemod/context.ts
|
|
1384
1756
|
/** One version's rename map: what the codemod rewrites and what it only reports. */
|
|
1385
1757
|
const SCRIPT_BLOCK = /<script\b([^>]*)>([\s\S]*?)<\/script>/gu;
|
|
@@ -2216,10 +2588,16 @@ const CODEMOD_0_8 = Object.freeze({
|
|
|
2216
2588
|
signatures: SIGNATURE_CHANGES_0_8,
|
|
2217
2589
|
configMoves: CONFIG_MOVES_0_8
|
|
2218
2590
|
});
|
|
2591
|
+
const CODEMOD_0_17 = Object.freeze({
|
|
2592
|
+
renames: [],
|
|
2593
|
+
signatures: [],
|
|
2594
|
+
literals: rewriteLiterals017
|
|
2595
|
+
});
|
|
2219
2596
|
/** Each codemod version and the rename map it applies. */
|
|
2220
2597
|
const CODEMODS = Object.freeze({
|
|
2221
2598
|
"0.5": CODEMOD_0_5,
|
|
2222
|
-
"0.8": CODEMOD_0_8
|
|
2599
|
+
"0.8": CODEMOD_0_8,
|
|
2600
|
+
"0.17": CODEMOD_0_17
|
|
2223
2601
|
});
|
|
2224
2602
|
function codemodVersions() {
|
|
2225
2603
|
return Object.keys(CODEMODS);
|
|
@@ -2283,7 +2661,7 @@ function codemod(options) {
|
|
|
2283
2661
|
const source = readFileSync(file, "utf8");
|
|
2284
2662
|
if (!source.includes("permdock") && !basename(file).startsWith("permdock.config.")) continue;
|
|
2285
2663
|
const name = rel(options.cwd, file);
|
|
2286
|
-
const result = isCodeFile(file) ? withConfigMoves(file, transformSource(file, source, set), set) : cliResult(file, source);
|
|
2664
|
+
const result = isCodeFile(file) ? withConfigMoves(file, withLiterals(file, transformSource(file, source, set), set), set) : cliResult(file, source);
|
|
2287
2665
|
if (result.error !== void 0) {
|
|
2288
2666
|
followUps.push({
|
|
2289
2667
|
file: name,
|
|
@@ -2331,6 +2709,15 @@ function codemod(options) {
|
|
|
2331
2709
|
followUps
|
|
2332
2710
|
};
|
|
2333
2711
|
}
|
|
2712
|
+
function withLiterals(file, result, set) {
|
|
2713
|
+
if (result.error !== void 0 || set.literals === void 0) return result;
|
|
2714
|
+
const rewritten = set.literals(file, result.source);
|
|
2715
|
+
return {
|
|
2716
|
+
source: rewritten.source,
|
|
2717
|
+
changes: [...result.changes, ...rewritten.changes],
|
|
2718
|
+
followUps: [...result.followUps, ...rewritten.followUps]
|
|
2719
|
+
};
|
|
2720
|
+
}
|
|
2334
2721
|
function withConfigMoves(file, result, set) {
|
|
2335
2722
|
if (result.error !== void 0 || set.configMoves === void 0) return result;
|
|
2336
2723
|
const moved = moveConfigKeys(file, result.source, set.configMoves);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-L8EstFNm.js";
|
|
2
|
-
import { i as dryRunFlag } from "./flags-
|
|
2
|
+
import { i as dryRunFlag } from "./flags-BlmpmXoY.js";
|
|
3
3
|
//#region src/cli/commands/codemod.ts
|
|
4
4
|
const codemod = defineLeaf({
|
|
5
5
|
positionals: [{
|
|
@@ -7,7 +7,7 @@ const codemod = defineLeaf({
|
|
|
7
7
|
description: "The release to migrate to (0.5)",
|
|
8
8
|
required: true,
|
|
9
9
|
async complete() {
|
|
10
|
-
return (await import("./codemod-
|
|
10
|
+
return (await import("./codemod-DNGMGqBS.js")).codemodVersions();
|
|
11
11
|
}
|
|
12
12
|
}, {
|
|
13
13
|
name: "paths",
|
|
@@ -22,7 +22,7 @@ const codemod = defineLeaf({
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
async run(ctx, { flags, args, rest }) {
|
|
25
|
-
return (await import("./codemod-
|
|
25
|
+
return (await import("./codemod-DNGMGqBS.js")).runCodemod({
|
|
26
26
|
cwd: ctx.cwd,
|
|
27
27
|
version: args["version"],
|
|
28
28
|
paths: rest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as CliError } from "./errors-
|
|
1
|
+
import { n as CliError } from "./errors-BhRkoNS7.js";
|
|
2
2
|
import { t as defineLeaf } from "./command-L8EstFNm.js";
|
|
3
|
-
import { o as fileOut, t as checkFlag } from "./flags-
|
|
3
|
+
import { o as fileOut, t as checkFlag } from "./flags-BlmpmXoY.js";
|
|
4
4
|
//#region src/cli/commands/collect.ts
|
|
5
5
|
const collect = defineLeaf({
|
|
6
6
|
flags: {
|
|
@@ -29,9 +29,9 @@ const collect = defineLeaf({
|
|
|
29
29
|
};
|
|
30
30
|
if (flags.watch) {
|
|
31
31
|
if (flags.check) throw new CliError("usage", "collect: --watch writes the catalog; drop --check", { code: "invalid_value" });
|
|
32
|
-
return (await import("./watch-
|
|
32
|
+
return (await import("./watch-DnymTAfe.js")).watchCollect(ctx, overrides);
|
|
33
33
|
}
|
|
34
|
-
const result = await (await import("./collect-
|
|
34
|
+
const result = await (await import("./collect-CAibhmCi.js")).runCollect({
|
|
35
35
|
cwd: ctx.cwd,
|
|
36
36
|
config: ctx.config,
|
|
37
37
|
collect: overrides,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as runCollect } from "./collect-HfJXl8Tr.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as describeError } from "./errors-
|
|
1
|
+
import { a as describeError } from "./errors-BhRkoNS7.js";
|
|
2
2
|
import { a as rel, r as listSourceFiles, s as writeFileEnsuringDir, t as defaultSrcPath } from "./files-BSjrtIHw.js";
|
|
3
|
-
import { n as catalogForCompare, o as formatCatalogJson, r as catalogForDrift, t as buildCatalog } from "./catalog-doc-
|
|
4
|
-
import { a as loadModule, i as loadConfiguredPolicy, r as leavesOf, s as pickNamed, t as asPermissionTree } from "./load-
|
|
5
|
-
import { t as loadConfiguredOperations } from "./catalog-operations-
|
|
3
|
+
import { n as catalogForCompare, o as formatCatalogJson, r as catalogForDrift, t as buildCatalog } from "./catalog-doc-C4DGfJCO.js";
|
|
4
|
+
import { a as loadModule, i as loadConfiguredPolicy, r as leavesOf, s as pickNamed, t as asPermissionTree } from "./load-BaEamml-.js";
|
|
5
|
+
import { t as loadConfiguredOperations } from "./catalog-operations-DVI5QO5R.js";
|
|
6
6
|
import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
|
|
7
7
|
import { t as shortDiff } from "./text-diff-BtfSmdUo.js";
|
|
8
8
|
import { existsSync, readFileSync } from "node:fs";
|
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-BwFC4Qjs.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-BxiwRotu.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 +1 @@
|
|
|
1
|
-
export { n as compileWhere, r as escapeLike } from "../compile-
|
|
1
|
+
export { n as compileWhere, r as escapeLike } from "../compile-B_oJqmIg.js";
|
|
@@ -5,7 +5,7 @@ import { n as PermDockValidationError } from "./validation-error-CYg2kJEw.js";
|
|
|
5
5
|
import { t as expiredAt } from "./expiry-6XByK0dm.js";
|
|
6
6
|
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-8-pCScBO.js";
|
|
7
7
|
import { o as epochSeconds, t as INVALID_NOW } from "./time-nR1JesoH.js";
|
|
8
|
-
import {
|
|
8
|
+
import { c as rootScope, d as scopeList, l as scopeChain, p as tenantOf, s as resolveScope } from "./scopes-BSdYaGHs.js";
|
|
9
9
|
import { t as isoInstant } from "./instant-DK3Iz83e.js";
|
|
10
10
|
//#region src/conditions/graph-sql.ts
|
|
11
11
|
/** A Postgres identifier, schema-qualified names split on `.`. */
|
|
@@ -460,8 +460,8 @@ function negate(node) {
|
|
|
460
460
|
default: throw nonPortable(`unknown compiled node '${String(node)}'`);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
function matchingMemberships(condition, subject, now
|
|
464
|
-
const memberships =
|
|
463
|
+
function matchingMemberships(condition, subject, now) {
|
|
464
|
+
const memberships = subject?.principal?.memberships ?? [];
|
|
465
465
|
const wanted = new Set(condition.roles);
|
|
466
466
|
return memberships.filter((membership) => {
|
|
467
467
|
if (expiredAt(membership, now)) return false;
|
|
@@ -549,7 +549,7 @@ function compileMemberOf(condition, options) {
|
|
|
549
549
|
if (condition.scope !== "resource" && scope === void 0) return NEVER;
|
|
550
550
|
const mapping = scope === void 0 ? condition.resource === void 0 ? void 0 : options.memberships?.resource?.[condition.resource] : scopeMembershipTable(options.memberships, scopes, scope);
|
|
551
551
|
if (mapping !== void 0) return compileExists(condition, mapping, options.subject, Math.ceil(now), options.memberships, scopes);
|
|
552
|
-
const matched = matchingMemberships(condition, options.subject, now
|
|
552
|
+
const matched = matchingMemberships(condition, options.subject, now);
|
|
553
553
|
const active = activeTenant(options.subject);
|
|
554
554
|
if (scope !== void 0) return inList(condition.field, matched.flatMap((membership) => {
|
|
555
555
|
if (membership.scope !== scope || membership.id === void 0) return [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kt as Instant, bn as Scope, wr as Condition, yr as Subject } from "./policy-types-IRJVABmm.js";
|
|
2
2
|
import { b as ResourceNode } from "./permission-types-CAY-GU7e.js";
|
|
3
|
-
import { f as WhereResult } from "./permdock-
|
|
3
|
+
import { f as WhereResult } from "./permdock-DUWZEOLR.js";
|
|
4
4
|
import { r as RelationsMapping, t as GraphSql } from "./graph-sql-BwFC4Qjs.js";
|
|
5
5
|
//#region src/conditions/compile.d.ts
|
|
6
6
|
type MembershipTable = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as CliError } from "./errors-
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as resolve } from "./manifest-
|
|
1
|
+
import { n as CliError } from "./errors-BhRkoNS7.js";
|
|
2
|
+
import { a as GLOBAL_FLAGS, i as suggestion } from "./args-iafbHiXn.js";
|
|
3
|
+
import { a as resolve } from "./manifest-Dij1U0hx.js";
|
|
4
4
|
import { t as defineLeaf } from "./command-L8EstFNm.js";
|
|
5
5
|
//#region src/cli/core/completion.ts
|
|
6
6
|
const SHELLS = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-CAf557ZB.js";
|
|
2
|
-
import { i as configError, n as CliError } from "./errors-
|
|
3
|
-
import { n as
|
|
2
|
+
import { i as configError, n as CliError } from "./errors-BhRkoNS7.js";
|
|
3
|
+
import { n as betterSupabaseConfig, r as betterSupabaseDefaults } from "./better-supabase-BJtQ-kNf.js";
|
|
4
4
|
import { a as isSection, i as isModuleKey, n as MODULE_KEYS, o as kindOf, r as describeKinds, t as CONFIG_SHAPE } from "./config-shape-tsxHx71E.js";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { relative, resolve } from "node:path";
|
|
@@ -77,7 +77,7 @@ async function readConfig(cwd, fromFlag, options) {
|
|
|
77
77
|
file: void 0
|
|
78
78
|
};
|
|
79
79
|
if (!existsSync(path)) throw new CliError("usage", `PermDock CLI: config file not found: ${path}`, { code: "config_not_found" });
|
|
80
|
-
const { loadModule, pickNamed } = await import("./load-
|
|
80
|
+
const { loadModule, pickNamed } = await import("./load-CjnlPxpL.js");
|
|
81
81
|
const mod = await loadModule(path, options);
|
|
82
82
|
const display = relative(cwd, path).replaceAll("\\", "/");
|
|
83
83
|
const raw = pickNamed(mod, ["default"]);
|
|
@@ -92,7 +92,7 @@ function hasModuleValue(raw) {
|
|
|
92
92
|
return isRecord(raw) && Object.keys(MODULE_KEYS).some((key) => isRecord(raw[key]));
|
|
93
93
|
}
|
|
94
94
|
async function traceValues(cwd, file, display, config, options) {
|
|
95
|
-
const { traceModuleValues } = await import("./module-values-
|
|
95
|
+
const { traceModuleValues } = await import("./module-values-B8tNIxdd.js");
|
|
96
96
|
return traceModuleValues({
|
|
97
97
|
cwd,
|
|
98
98
|
file,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-L8EstFNm.js";
|
|
2
|
-
import { a as failOnFlag } from "./flags-
|
|
2
|
+
import { a as failOnFlag } from "./flags-BlmpmXoY.js";
|
|
3
3
|
//#region src/cli/commands/config.ts
|
|
4
4
|
const config = defineLeaf({
|
|
5
5
|
flags: {
|
|
@@ -10,7 +10,7 @@ const config = defineLeaf({
|
|
|
10
10
|
...failOnFlag
|
|
11
11
|
},
|
|
12
12
|
async run(ctx, { flags }) {
|
|
13
|
-
const { runConfig } = await import("./config-report-
|
|
13
|
+
const { runConfig } = await import("./config-report-C1jl7Na-.js");
|
|
14
14
|
return runConfig({
|
|
15
15
|
cwd: ctx.cwd,
|
|
16
16
|
config: ctx.config,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as rel, t as defaultSrcPath } from "./files-BSjrtIHw.js";
|
|
2
2
|
import { r as CONFIG_REPORT_SCHEMA } from "./version-DMQ0dnN5.js";
|
|
3
3
|
import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
|
|
4
|
-
import { n as guessPermissions, t as barrelFile } from "./collect-
|
|
4
|
+
import { n as guessPermissions, t as barrelFile } from "./collect-HfJXl8Tr.js";
|
|
5
5
|
import "./sources-C4vkzZJV.js";
|
|
6
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
6
|
+
import { t as DOCS_BASE } from "./manifest-Dij1U0hx.js";
|
|
7
7
|
import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-DcJABbLW.js";
|
|
8
8
|
//#region src/cli/config-report.ts
|
|
9
9
|
function configReport(input) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as switchTenant, t as providerStore } from "./provider-store-
|
|
2
|
+
import { l as isPromiseLike } from "./store-options--zWn48PK.js";
|
|
3
|
+
import { n as switchTenant, t as providerStore } from "./provider-store-BQP_pp8s.js";
|
|
4
4
|
import { getContext, onDestroy, setContext } from "svelte";
|
|
5
5
|
import { toStore } from "svelte/store";
|
|
6
6
|
//#region src/svelte/context.ts
|
package/dist/convex/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
4
|
-
import { a as ProblemDetails, r as PermDockDeniedError } from "../errors-
|
|
5
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
3
|
+
import { a as PermDock } from "../permdock-DUWZEOLR.js";
|
|
4
|
+
import { a as ProblemDetails, r as PermDockDeniedError } from "../errors-Dc9FdamT.js";
|
|
5
|
+
import { t as InstanceOptions } from "../instance-options-BOCRxEFb.js";
|
|
6
6
|
//#region src/convex/types.d.ts
|
|
7
7
|
type ConvexContextLike = {
|
|
8
8
|
readonly auth?: {
|
package/dist/convex/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as PermDockValidationError } from "../validation-error-CYg2kJEw.js";
|
|
3
3
|
import { n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-B6R_lg2a.js";
|
|
4
|
-
import { l as withApp } from "../permdock-
|
|
5
|
-
import { n as resolveOrNull, t as buildInstance } from "../build-instance-
|
|
6
|
-
import { n as tenantScope, t as actorFrom } from "../adapter-context-
|
|
4
|
+
import { l as withApp } from "../permdock-DdzMv5-F.js";
|
|
5
|
+
import { n as resolveOrNull, t as buildInstance } from "../build-instance-lye7oEqf.js";
|
|
6
|
+
import { n as tenantScope, t as actorFrom } from "../adapter-context-OHikyRqV.js";
|
|
7
7
|
//#region src/convex/create.ts
|
|
8
8
|
/**
|
|
9
9
|
* Convex's runtime sends `data` to the client only for an error carrying this
|