void 1.11.0 → 1.12.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/{account-cmd-Bbr5cHjm.mjs → account-cmd-D_0qJ9fx.mjs} +6 -6
- package/dist/{agents-DRo8gzni.mjs → agents-64FnLwxP.mjs} +6 -5
- package/dist/{application-analysis-XyUuNqYA.mjs → application-analysis-Cx2S63z5.mjs} +48 -22
- package/dist/{application-routing-DATqynKH.mjs → application-routing-BAXpnawu.mjs} +1 -1
- package/dist/{assets-DZBd7yqh.mjs → assets-Br6_BeFJ.mjs} +34 -27
- package/dist/{ast-Cv0JwXqb.mjs → ast-BkPQu7A0.mjs} +5 -1
- package/dist/{auth-BN0NU9dz.mjs → auth-Boz0lrb3.mjs} +1 -1
- package/dist/{auth-CCk9Seol.mjs → auth-DlLDymuc.mjs} +24 -12
- package/dist/{auth-link-CVxoyU81.mjs → auth-link-C97r9p2N.mjs} +6 -6
- package/dist/{auth-router-ChXKduRM.mjs → auth-router-BmzEgzYx.mjs} +5 -5
- package/dist/{better-auth-shared-B8W8tZxP.d.mts → better-auth-shared-BS3pDQbT.d.mts} +6 -6
- package/dist/{better-auth-shared-DRHo5FoG.mjs → better-auth-shared-BcqDt-37.mjs} +7 -2
- package/dist/{build-cmd-C3b13rRf.mjs → build-cmd-BaFsyZrz.mjs} +13 -12
- package/dist/{cache-B1WzZV60.mjs → cache-xO711ATQ.mjs} +6 -6
- package/dist/{cancel-deploy-BggXixU_.mjs → cancel-deploy-Di11ynsr.mjs} +5 -5
- package/dist/{cf-access-pejlJmuy.mjs → cf-access-DmkKPcAI.mjs} +0 -8
- package/dist/{cf-access-Dnyw8KFY.mjs → cf-access-FaIm95jA.mjs} +8 -4
- package/dist/{cf-build-output-bBx1gDll.mjs → cf-build-output-Ca201_n1.mjs} +27 -25
- package/dist/cf-build-output-Dy7N0hQN.mjs +1 -0
- package/dist/{cf-command-values-Ccl-zRhl.mjs → cf-command-values-5BPBRc9Z.mjs} +1 -1
- package/dist/cf-config-migrate-D271BTiw.mjs +1664 -0
- package/dist/{cf-worker-settings-CARs4Wy9.mjs → cf-worker-settings-BBdlhm9U.mjs} +1 -1
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +17 -14
- package/dist/cli/env-schema-probe.d.mts +3 -1
- package/dist/cli/env-schema-probe.mjs +7 -8
- package/dist/{cli-main-DW09sVsT.mjs → cli-main-DlW6lB8s.mjs} +142 -88
- package/dist/{client-DGfZTE4V.mjs → client-DkYzDEC0.mjs} +1 -1
- package/dist/{client-DF6U7KLP.mjs → client-ImIe7Mjq.mjs} +186 -17
- package/dist/{cloudflare-auth-pNvmT6kL.mjs → cloudflare-auth-eWfhdZCk.mjs} +1 -1
- package/dist/{cloudflare-cmd-BOhToob3.mjs → cloudflare-cmd-SsFlJe2B.mjs} +7 -8
- package/dist/{cloudflare-config-D1dMHbvz.mjs → cloudflare-config-D9UFH_A5.mjs} +2 -2
- package/dist/{cloudflare-connect-DTrsIBAa.mjs → cloudflare-connect-BgpHcSg3.mjs} +3 -3
- package/dist/{cloudflare-operations-DmqtzoX4.mjs → cloudflare-operations-BF0PSErW.mjs} +12 -20
- package/dist/{cloudflare-operations-BditDbcd.mjs → cloudflare-operations-dpRD-2Px.mjs} +1 -1
- package/dist/cloudflare-process-60r4Z2Zf.mjs +671 -0
- package/dist/cloudflare-user-output-CCR99eQY.mjs +19 -0
- package/dist/collect-B6nlSnsb.mjs +1 -0
- package/dist/{collect-C6Blu9yw.mjs → collect-rNLybAnF.mjs} +3 -3
- package/dist/{config-Do7gJI3T.mjs → config-BFX5ZB1J.mjs} +5 -4
- package/dist/{config-CeZd67L0.mjs → config-BSoW3QCB.mjs} +5 -5
- package/dist/{config-DYW2TBgz.d.mts → config-DA6ZbLXO.d.mts} +1 -1
- package/dist/{config-dMSpL-ml.mjs → config-DtjrUtPo.mjs} +1 -1
- package/dist/{config-BmvqLnbi.mjs → config-Dv5jri1-.mjs} +4 -4
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-B3bKxRzX.mjs → connect-DDRQGfFE.mjs} +9 -9
- package/dist/{create-project-DLUlxmf5.mjs → create-project-CY7sP8sI.mjs} +7 -6
- package/dist/{create-project-By7ymK7F.mjs → create-project-Dro3K-az.mjs} +1 -1
- package/dist/{db-3qsP21pH.mjs → db-DmlaWVBu.mjs} +120 -103
- package/dist/db-seed-loader-Bcz_SutQ.mjs +253 -0
- package/dist/{db-types-DC7KJLx2.mjs → db-types-B4Cf9dzR.mjs} +1 -1
- package/dist/{delete-HbFqgEFC.mjs → delete-Uuq9ch6o.mjs} +6 -6
- package/dist/{deploy-2QjsBEGw.mjs → deploy-B9E7_rHC.mjs} +218 -553
- package/dist/deploy-BB3rsZbP.mjs +2 -0
- package/dist/{deploy-managed-static-JoNP3cec.mjs → deploy-managed-static-IKZyuc1W.mjs} +115 -194
- package/dist/deploy-security-notice-C3LalelR.mjs +192 -0
- package/dist/{deploy-transport-QAkhJYRI.mjs → deploy-transport-BKP_oV9q.mjs} +4 -4
- package/dist/deploy.mjs +9 -9
- package/dist/{dev-inbox-BiamQEAa.mjs → dev-inbox-ClVjKEHy.mjs} +1 -1
- package/dist/direct-r2-upload-DFXLWfXV.mjs +204 -0
- package/dist/discover-D2KGP3cR.mjs +1 -0
- package/dist/{discover-Vd18lHsj.mjs → discover-IcspacCg.mjs} +1 -1
- package/dist/{dispatch-BlOYh1Vc.mjs → dispatch-DIhDA3NI.mjs} +11 -10
- package/dist/{dist-Cp4b1_T9.mjs → dist-C47zy_kJ.mjs} +1 -1
- package/dist/{dist-STQXl8ck.mjs → dist-Cr_xGE_K.mjs} +73 -38
- package/dist/{domain-COkVSfII.mjs → domain-B_xY1yZ5.mjs} +8 -10
- package/dist/{dotenv-CEI8hapP.mjs → dotenv-BG6RQavH.mjs} +2 -2
- package/dist/{drizzle-BXVOa6Jg.mjs → drizzle-BJDMPrj7.mjs} +3 -4
- package/dist/{drizzle-CvSGrvdl.mjs → drizzle-CQ5jWuDL.mjs} +1 -1
- package/dist/{email-Dj02fLgQ.mjs → email-BIC15L7a.mjs} +33 -30
- package/dist/{email-cloudflare-DDknDAgp.mjs → email-cloudflare-C447nOqq.mjs} +29 -38
- package/dist/{email-pattern-BYr-EFq5.mjs → email-pattern-bRna9MOJ.mjs} +2 -2
- package/dist/{entry-DMgR7XOf.mjs → entry-Bwb9ev8K.mjs} +13 -10
- package/dist/{env-BA7e5yzp.mjs → env-DJPZYHT5.mjs} +8 -8
- package/dist/{env-UqS-21xi.mjs → env-EjHqc7m9.mjs} +1 -1
- package/dist/{env-types-WEZw5D-r.mjs → env-types-D2hBodXP.mjs} +2 -19
- package/dist/{env-validation-DfJ9Fzfa.mjs → env-validation-D-v5_CWL.mjs} +13 -13
- package/dist/{env-validation-ly_Q9Kgd.mjs → env-validation-j9pjCDfA.mjs} +1 -1
- package/dist/{error-pages-QNeBXiRR.mjs → error-pages-GORL6F_e.mjs} +1 -1
- package/dist/{fetch-CbI6lNnk.d.mts → fetch-CczQyIed.d.mts} +1 -1
- package/dist/{fetch-DdK9eGin.mjs → fetch-CiEsvjpP.mjs} +1 -1
- package/dist/{fetch-stream-DQAavFdm.mjs → fetch-stream-BIG5lHW6.mjs} +3 -4
- package/dist/{fetch-stream-DoED9atq.d.mts → fetch-stream-DRX8-83b.d.mts} +2 -2
- package/dist/gen-CQDiPi8m.mjs +1 -0
- package/dist/{gen-EMpnzNGz.mjs → gen-DiTZlDx8.mjs} +21 -18
- package/dist/{generate-BOp1g1H_.mjs → generate-C3ZAqCy-.mjs} +1 -1
- package/dist/{generate-CWb8aOsm.mjs → generate-Dq2Bgw75.mjs} +6 -6
- package/dist/{git-metadata-Cukp5kV5.mjs → git-metadata-BEokJ6US.mjs} +1 -1
- package/dist/{github-cmd-8bXgJNAQ.mjs → github-cmd-DPmby8x-.mjs} +14 -9
- package/dist/{handler-w_FAiIRu.mjs → handler-DCrDLzw2.mjs} +3 -3
- package/dist/has-own-key-D9QEnAkF.mjs +5 -0
- package/dist/{head-0o0QoREY.mjs → head-BwQ5kgqt.mjs} +5 -4
- package/dist/{head-CVO92KEx.d.mts → head-fUp8n_QJ.d.mts} +9 -4
- package/dist/{headers-BjgvlY29.mjs → headers-DqBsjDxg.mjs} +7 -7
- package/dist/{help-DCQKp3Kp.mjs → help-9wfMyXHb.mjs} +130 -60
- package/dist/help-Dy3w4rPq.mjs +1 -0
- package/dist/{inbound-BHt4dIlL.d.mts → inbound-CwgZSqFI.d.mts} +9 -3
- package/dist/{inbound--OF7zkwX.mjs → inbound-feMn1Rxx.mjs} +7 -7
- package/dist/{index-CmqHYj2R.d.mts → index-8cAgNdb6.d.mts} +1 -1
- package/dist/{index-BTmhCDbw.d.mts → index-BQ5qYiAw.d.mts} +2 -2
- package/dist/{index-BESZTC1z.d.mts → index-BYcWajVp.d.mts} +2 -1
- package/dist/{index-BXdP39qx.d.mts → index-Dn2mkPr2.d.mts} +24 -23
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +341 -444
- package/dist/{info--jdAIsJN.mjs → info-BWEWaOBo.mjs} +4 -4
- package/dist/{init-BLZvktk_.mjs → init-BuTPVLPO.mjs} +69 -335
- package/dist/{isr-config-Czzb4mIq.mjs → isr-config-DiTnL9Tb.mjs} +5 -5
- package/dist/{link-DPJ4jN7y.mjs → link-BiesPyT4.mjs} +7 -7
- package/dist/{list-B-au6xJt.mjs → list-CkonftPQ.mjs} +11 -7
- package/dist/{live-DvtxTUhW.mjs → live-dvGThbwy.mjs} +14 -17
- package/dist/{load-user-env-BltIJLtl.mjs → load-user-env-B8qC0Q2Y.mjs} +1 -1
- package/dist/{local-d1-C6xn26Nl.mjs → local-d1-CYOYkVwO.mjs} +3 -3
- package/dist/{login-p1_BMgXg.mjs → login-BSOSah1j.mjs} +8 -6
- package/dist/login-DWCZeCX9.mjs +1 -0
- package/dist/{logs-UNH3vQeX.mjs → logs-HOBUnroa.mjs} +9 -9
- package/dist/{migrate-9dlt6Mxu.mjs → migrate-BNZL1hee.mjs} +9 -10
- package/dist/migrate-C9aoWLvY.mjs +1 -0
- package/dist/{migrations-Cbns2RAm.mjs → migrations-CUHhX65Y.mjs} +5 -5
- package/dist/{mime-BGoZ8ZLL.mjs → mime-Btw9R3CC.mjs} +26 -12
- package/dist/{mysql-sql-SlpS6OMg.mjs → mysql-sql-CB52k8tQ.mjs} +45 -22
- package/dist/nitro.d.mts +3 -0
- package/dist/nitro.mjs +14 -5
- package/dist/{node-DqkiQujF.mjs → node-DVJWfV6s.mjs} +6 -6
- package/dist/{operator-ai-logging-BQ6mOgQs.mjs → operator-ai-logging-ZDqqhnIq.mjs} +11 -10
- package/dist/operator-args-DCkWbgT-.mjs +1499 -0
- package/dist/{operator-auth-CD3pap65.mjs → operator-auth-BjoPLgja.mjs} +2 -2
- package/dist/{operator-client-XvXTkea6.mjs → operator-client-DzebIntv.mjs} +3 -3
- package/dist/{operator-cmd-CKbZbNKn.mjs → operator-cmd-AZoeI9Pl.mjs} +28 -12
- package/dist/operator-cmd-DEnHFmJF.mjs +1 -0
- package/dist/operator-security-Bo26FP01.mjs +263 -0
- package/dist/{output-Bc8ixgPF.mjs → output-BZLnu0z8.mjs} +13 -3
- package/dist/output-D7K9TWIA.mjs +1 -0
- package/dist/{package-json-DvS6IFRv.mjs → package-json-4xUI3xLz.mjs} +1 -1
- package/dist/pages/client.d.mts +53 -30
- package/dist/pages/client.mjs +93 -31
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +7 -7
- package/dist/pages/islands-plugin.d.mts +26 -8
- package/dist/pages/islands-plugin.mjs +61 -22
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{pgpass-CEtnBOZO.mjs → pgpass-BLPoYN9_.mjs} +3 -2
- package/dist/platform-args-DNbNZ_RR.mjs +1 -0
- package/dist/{platform-args-DQSMW4EP.mjs → platform-args-lwCyQ6Xy.mjs} +37 -9
- package/dist/{platform-auth-config-D80AKe72.mjs → platform-auth-config-DLRMPw1G.mjs} +26 -23
- package/dist/{platform-auth-protection-k1Ox-u9T.mjs → platform-auth-protection-HSmLmD3d.mjs} +10 -10
- package/dist/{platform-auth-recovery-D-hKehPy.mjs → platform-auth-recovery-BXPhTlKa.mjs} +11 -9
- package/dist/{platform-cmd-Dtz5lw7R.mjs → platform-cmd-CqRjxFEU.mjs} +1 -1
- package/dist/{platform-cmd-DQ0Wi61H.mjs → platform-cmd-DJ-fOYhL.mjs} +11 -11
- package/dist/{platform-discovery-B0eZjZ3B.mjs → platform-discovery-CLxtixHJ.mjs} +1 -1
- package/dist/{platform-domain-BMGS4l74.mjs → platform-domain-CRsRJOws.mjs} +14 -10
- package/dist/{platform-lifecycle-y4AfmC7M.mjs → platform-lifecycle-bx_kpqo7.mjs} +1 -1
- package/dist/{platform-lifecycle-BCkNQNsQ.mjs → platform-lifecycle-fau3VKv6.mjs} +755 -207
- package/dist/platform-management-BRGhD-oF.mjs +1 -0
- package/dist/{platform-management-Cj2aXFqD.mjs → platform-management-CnKBdDx5.mjs} +227 -58
- package/dist/{platform-plans-config-CrUUzEl9.mjs → platform-plans-config-2C3_5EDs.mjs} +112 -35
- package/dist/{platform-recovery-DKZnALHI.mjs → platform-recovery-poxgOOAY.mjs} +5 -5
- package/dist/{platform-registry-DZ_2Xuqd.mjs → platform-registry-DHH6fivm.mjs} +6 -5
- package/dist/{platform-setup-CKmSEb1J.mjs → platform-setup-DYylapHD.mjs} +26 -12
- package/dist/{plugin-inference-B_urWd5Z.mjs → plugin-inference-7O11_E4H.mjs} +26 -26
- package/dist/{prepare-vCdm5moJ.mjs → prepare-BbvlKreR.mjs} +12 -12
- package/dist/prepare-BmG2E6TI.mjs +1 -0
- package/dist/{prepare-CU7SZieQ.mjs → prepare-DWjn1Lzd.mjs} +3 -3
- package/dist/{project-cmd-B4cgPSi4.mjs → project-cmd-DyUEFi2b.mjs} +30 -24
- package/dist/{project-CLwxcEdq.mjs → project-dh9431bN.mjs} +2 -2
- package/dist/{project-paths-CUhCPMpK.mjs → project-paths-2ENfCCih.mjs} +4 -3
- package/dist/project-security--tYGFPGo.mjs +1340 -0
- package/dist/project-security-DZEQgnsS.mjs +1 -0
- package/dist/{project-team-BdX6anO3.mjs → project-team-BszTHgzC.mjs} +8 -8
- package/dist/{project-token-C1rcq8Xb.mjs → project-token-DBDy4NdV.mjs} +6 -6
- package/dist/{project-tsconfig-MyRJgufB.mjs → project-tsconfig-BOA4ym99.mjs} +25 -5
- package/dist/{project-DVsTAWFh.mjs → project-uXKua1it.mjs} +1 -1
- package/dist/project-zero-trust-D9sUouij.mjs +210 -0
- package/dist/{protocol-W5EQcIzN.mjs → protocol-CE3wP-H1.mjs} +5 -5
- package/dist/{protocol-BlAiF-hc.d.mts → protocol-ERy-n3jf.d.mts} +7 -4
- package/dist/{provision-DWnnKdT-.mjs → provision-Bh44omGA.mjs} +30 -22
- package/dist/{provision-CGI-T0mq.mjs → provision-DFv7SJDn.mjs} +1 -1
- package/dist/{public-B80SwOFp.d.mts → public-DB9C2Cy_.d.mts} +5 -2
- package/dist/{raw-7pQirZpQ.mjs → raw-5rak34QN.mjs} +2 -1
- package/dist/{redirect-Dqb4fEc5.mjs → redirect-DD825Stf.mjs} +1 -1
- package/dist/{requests-D6MaLS_Y.mjs → requests-CBokjiOi.mjs} +6 -6
- package/dist/{resolve-project-Da3OgCU1.mjs → resolve-project-8WZ3iVmr.mjs} +3 -3
- package/dist/resolve-project-YsTH-U9I.mjs +1 -0
- package/dist/{rollback-Bs8I8PF8.mjs → rollback-CEeHNFUn.mjs} +16 -7
- package/dist/route-types-CSed9-Dp.mjs +435 -0
- package/dist/{route-url-BBdkU7rb.mjs → route-url-B41eQ8QI.mjs} +1 -1
- package/dist/{route-url-Di1kB8D_.d.mts → route-url-Bd6IX-JZ.d.mts} +2 -1
- package/dist/routes-stub.d.mts +1 -1
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-CTk21HrO.mjs → runner-Bf94YVJK.mjs} +1 -1
- package/dist/{runner-CMZb7jNU.mjs → runner-CeguHWJx.mjs} +3 -2
- package/dist/{runner-mysql-CJ-HyqxV.mjs → runner-mysql-3XDKrn-g.mjs} +13 -9
- package/dist/{runner-mysql-C_PrAUTm.mjs → runner-mysql-r688x6Y9.mjs} +1 -1
- package/dist/{runner-pg-mYc75KfH.mjs → runner-pg-Buzw17hl.mjs} +1 -1
- package/dist/{runner-pg-2pjltt0t.mjs → runner-pg-DMJquR3d.mjs} +1 -1
- package/dist/runtime/ai/index.mjs +2 -2
- package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
- package/dist/runtime/auth/better-auth-d1.mjs +2 -2
- package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/auth/better-auth-mysql.mjs +2 -2
- package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
- package/dist/runtime/auth/better-auth-postgres.mjs +3 -3
- package/dist/runtime/client/fetch-server.d.mts +1 -1
- package/dist/runtime/client/fetch-server.mjs +2 -2
- package/dist/runtime/client/fetch-stream.d.mts +2 -2
- package/dist/runtime/client/fetch-stream.mjs +1 -1
- package/dist/runtime/client/fetch.d.mts +1 -1
- package/dist/runtime/client/fetch.mjs +1 -1
- package/dist/runtime/client/index.d.mts +2 -2
- package/dist/runtime/client/index.mjs +2 -2
- package/dist/runtime/client/react.d.mts +2 -2
- package/dist/runtime/client/react.mjs +2 -2
- package/dist/runtime/client/solid.d.mts +2 -2
- package/dist/runtime/client/solid.mjs +2 -2
- package/dist/runtime/client/svelte.d.mts +2 -2
- package/dist/runtime/client/svelte.mjs +2 -2
- package/dist/runtime/client/vue.d.mts +2 -2
- package/dist/runtime/client/vue.mjs +2 -2
- package/dist/runtime/db/index.d.mts +1 -1
- package/dist/runtime/db/index.mjs +3 -3
- package/dist/runtime/db/migrations/mysql-handler.mjs +1 -1
- package/dist/runtime/db/migrations/postgres-handler.mjs +1 -1
- package/dist/runtime/db/session.d.mts +1 -1
- package/dist/runtime/db/session.mjs +1 -1
- package/dist/runtime/durable/index.mjs +7 -5
- package/dist/runtime/email/index.d.mts +1 -1
- package/dist/runtime/email/index.mjs +14 -11
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +4 -4
- package/dist/runtime/env/public-client.d.mts +4 -1
- package/dist/runtime/env/public.d.mts +1 -1
- package/dist/runtime/env/public.mjs +2 -2
- package/dist/runtime/env/runtime.mjs +1 -1
- package/dist/runtime/handler/index.d.mts +1 -1
- package/dist/runtime/handler/index.mjs +1 -1
- package/dist/runtime/handler/validator.d.mts +1 -1
- package/dist/runtime/handler/validator.mjs +1 -1
- package/dist/runtime/isr/index.mjs +1 -1
- package/dist/runtime/kv/index.mjs +1 -1
- package/dist/runtime/live/client.d.mts +2 -2
- package/dist/runtime/live/client.mjs +7 -7
- package/dist/runtime/live/index.d.mts +1 -1
- package/dist/runtime/live/index.mjs +1 -1
- package/dist/runtime/live/server.mjs +3 -3
- package/dist/runtime/queues/index.mjs +2 -2
- package/dist/runtime/remote/index.d.mts +5 -1
- package/dist/runtime/remote/index.mjs +10 -9
- package/dist/runtime/routing/index.d.mts +11 -12
- package/dist/runtime/routing/index.mjs +69 -65
- package/dist/runtime/routing/route-url.d.mts +1 -1
- package/dist/runtime/routing/route-url.mjs +1 -1
- package/dist/runtime/sandbox/index.d.mts +1 -1
- package/dist/runtime/sandbox/index.mjs +2 -2
- package/dist/runtime/sse/client.d.mts +1 -1
- package/dist/runtime/sse/index.mjs +1 -1
- package/dist/runtime/storage/index.mjs +1 -1
- package/dist/runtime/ws/index.d.mts +1 -1
- package/dist/runtime/ws/index.mjs +3 -2
- package/dist/runtime/ws/room.d.mts +1 -1
- package/dist/runtime/ws/room.mjs +2 -2
- package/dist/runtime/ws/server.d.mts +2 -2
- package/dist/runtime/ws/server.mjs +1 -1
- package/dist/{runtime-zDDinDI5.mjs → runtime-C_VPIJBF.mjs} +1 -1
- package/dist/{scan-LjuG3vfA.mjs → scan-Ct_SEzH4.mjs} +36 -29
- package/dist/{secret-DdUs8AuR.mjs → secret-Deqo3n_N.mjs} +11 -10
- package/dist/security-api-types-CU7zQtr_.mjs +9 -0
- package/dist/security-sarif-ClyYwtAW.mjs +123 -0
- package/dist/{serialize-Pf-CIQK_.mjs → serialize-BmB4BfKu.mjs} +1 -1
- package/dist/{server-CfUbeOjx.mjs → server-T-4mn8zy.mjs} +5 -4
- package/dist/{session-Cw8-b8Um.mjs → session-BT8XDkvL.mjs} +1 -1
- package/dist/{session-DgNrdNh_.d.mts → session-ouZYD7zb.d.mts} +1 -1
- package/dist/{skills-B40svMBE.mjs → skills-C-csz78e.mjs} +3 -3
- package/dist/{sse-BXnTfcf3.mjs → sse-D3ab0YQT.mjs} +16 -13
- package/dist/{static-exports-DFkzL-NX.mjs → static-exports-s7P86Ngp.mjs} +3 -3
- package/dist/{subcommand-prompt-D-m3Umap.mjs → subcommand-prompt-B4LOLosl.mjs} +31 -21
- package/dist/sveltekit.mjs +1 -1
- package/dist/{terminal-log-text-DNsWJREL.mjs → terminal-log-text-CfS2JKM6.mjs} +1 -1
- package/dist/{url-DaehRGKR.mjs → url-DBQluotE.mjs} +4 -1
- package/dist/validate-CZYUIfR-.mjs +1 -0
- package/dist/{validate-Ddzl-IwT.mjs → validate-CtBWCzez.mjs} +7 -4
- package/dist/{validator-Duafcnh7.mjs → validator-Dfh9kCDm.mjs} +5 -5
- package/dist/{version-metadata-k6KFiyWt.mjs → version-metadata-DqgLa6gc.mjs} +1 -1
- package/dist/{wrangler-v2BmVchV.mjs → wrangler-DVe5KV5G.mjs} +49 -46
- package/dist/wrangler-Dq269bjx.mjs +1 -0
- package/dist/{wrapper-eh6MpBZA.mjs → wrapper-CcMYpOS8.mjs} +45 -171
- package/docs/guide/app-types.md +1 -1
- package/docs/guide/auth.md +2 -16
- package/docs/guide/database.md +2 -0
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/email/sending.md +18 -1
- package/docs/guide/pages-routing/actions-and-forms.md +4 -4
- package/docs/guide/pages-routing/head.md +20 -2
- package/docs/guide/platform/administration/plans.md +13 -0
- package/docs/guide/platform/administration/security-audits.md +213 -0
- package/docs/guide/platform/administration/zero-trust.md +6 -0
- package/docs/guide/platform/installation/ci.md +1 -1
- package/docs/guide/platform/installation/credentials.md +23 -20
- package/docs/guide/platform/installation/maintenance.md +8 -2
- package/docs/guide/platform/installation/prerequisites.md +1 -1
- package/docs/guide/platform/installation/uninstall.md +2 -0
- package/docs/guide/platform-administration.md +1 -0
- package/docs/guide/self-hosted-platform.md +14 -13
- package/docs/guide/type-safety.md +1 -1
- package/docs/integrations/cloudflare.md +3 -1
- package/docs/reference/api/handlers.md +3 -3
- package/docs/reference/api/types.md +11 -1
- package/docs/reference/cli/deploy.md +5 -1
- package/docs/reference/cli/domains.md +1 -1
- package/docs/reference/cli/platform-config.md +5 -3
- package/docs/reference/cli/platform-installation.md +29 -28
- package/docs/reference/cli/platform-security.md +98 -0
- package/docs/reference/cli/platform-zero-trust.md +2 -0
- package/docs/reference/cli/platform.md +1 -0
- package/docs/reference/cli/project.md +57 -0
- package/docs/reference/cli.md +3 -1
- package/docs/reference/config.md +2 -2
- package/package.json +30 -27
- package/skills/void/SKILL.md +7 -0
- package/dist/cf-build-output-D3_x71H6.mjs +0 -1
- package/dist/cf-config-migrate-CHtnM3_C.mjs +0 -348
- package/dist/cloudflare-process-wcnaQ5JG.mjs +0 -392
- package/dist/cloudflare-user-output-zEwuGrEJ.mjs +0 -19
- package/dist/collect-8i0wU63d.mjs +0 -1
- package/dist/deploy-DiFfBu8g.mjs +0 -2
- package/dist/discover-Diq0l6TZ.mjs +0 -1
- package/dist/gen-CuANrEzy.mjs +0 -1
- package/dist/help-7EzLA1qP.mjs +0 -1
- package/dist/login-apwve7WD.mjs +0 -1
- package/dist/migrate-BzRplq7m.mjs +0 -1
- package/dist/operator-args-BCCohcz3.mjs +0 -722
- package/dist/operator-cmd-D42knxMz.mjs +0 -1
- package/dist/output-D4UOUifX.mjs +0 -1
- package/dist/platform-args-Rgp86xa7.mjs +0 -1
- package/dist/platform-management-CRzeC70H.mjs +0 -1
- package/dist/prepare-C2MTqfFv.mjs +0 -1
- package/dist/project-zero-trust-CS02LrlK.mjs +0 -64
- package/dist/resolve-project-C5wC-Hoi.mjs +0 -1
- package/dist/route-types-CrODgORq.mjs +0 -655
- package/dist/validate-DY1U9rET.mjs +0 -1
- package/dist/wrangler-BPIAJdxA.mjs +0 -1
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-
|
|
2
|
-
import { a as utcTime } from "./operator-ai-logging-
|
|
3
|
-
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-
|
|
4
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
5
|
-
import {
|
|
1
|
+
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
+
import { a as utcTime } from "./operator-ai-logging-ZDqqhnIq.mjs";
|
|
3
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-BjoPLgja.mjs";
|
|
4
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-DzebIntv.mjs";
|
|
5
|
+
import { y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
6
6
|
import { stripVTControlCharacters } from "node:util";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
|
+
import { formatPlanSecurityCap, parsePlanSecurityCapInput, planSecurityCap, readPlanSecurityCaps, readStoredPlanSecurityCap } from "@void/platform/security-policy";
|
|
8
9
|
import { PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanId } from "@void/platform/plans";
|
|
9
10
|
import { AI_LOGGING_MODES, parsePlanAiLoggingInput } from "@void/platform/ai-logging";
|
|
10
11
|
// src/cli/platform-plans-config.ts
|
|
12
|
+
/** A plan's scan cap from an API answer, read leniently (bad entries read as `inherit`). */
|
|
13
|
+
function securityCapOf(caps, planId) {
|
|
14
|
+
return planSecurityCap(readPlanSecurityCaps(caps).caps, planId);
|
|
15
|
+
}
|
|
16
|
+
const PLAN_FILE_FIELDS = [
|
|
17
|
+
"name",
|
|
18
|
+
"limits",
|
|
19
|
+
"buildInstanceType",
|
|
20
|
+
"allowShortSlugs",
|
|
21
|
+
"aiLogging",
|
|
22
|
+
"securityCap"
|
|
23
|
+
];
|
|
11
24
|
const aiLoggingLabels = {
|
|
12
25
|
inherit: "inherit (AI Gateway setting)",
|
|
13
26
|
off: "off",
|
|
@@ -45,8 +58,9 @@ function limitValue(value, key) {
|
|
|
45
58
|
function shortSlugsLabel(allowed) {
|
|
46
59
|
return allowed ? "allowed" : "not allowed";
|
|
47
60
|
}
|
|
48
|
-
function writePlanDiff(from, to, write, aiLogging) {
|
|
61
|
+
function writePlanDiff(from, to, write, aiLogging, securityCap) {
|
|
49
62
|
if (aiLogging && aiLogging.from !== aiLogging.to) write(`AI Gateway logging: ${aiLogging.from} → ${aiLogging.to}`);
|
|
63
|
+
if (securityCap && securityCap.from !== securityCap.to) write(`Security scan cap: ${formatPlanSecurityCap(securityCap.from)} → ${formatPlanSecurityCap(securityCap.to)}`);
|
|
50
64
|
if (from.buildInstanceType !== to.buildInstanceType) write(`Build size: ${from.buildInstanceType} → ${to.buildInstanceType}`);
|
|
51
65
|
if (from.allowShortSlugs !== to.allowShortSlugs) write(`Short project slugs: ${shortSlugsLabel(from.allowShortSlugs)} → ${shortSlugsLabel(to.allowShortSlugs)}`);
|
|
52
66
|
for (const key of PLAN_EDITABLE_LIMIT_KEYS) if (from.limits[key] !== to.limits[key]) write(`${limitLabels[key]}: ${limitValue(from.limits[key], key)} → ${limitValue(to.limits[key], key)}`);
|
|
@@ -62,7 +76,7 @@ function showListing(listing, json) {
|
|
|
62
76
|
console.log(`${label(plan)} — ${count} accounts`);
|
|
63
77
|
}
|
|
64
78
|
if (listing.catalog.reconciliation && !listing.catalog.reconciliation.complete) console.log("Account updates are pending. Run void platform config plans sync --yes.");
|
|
65
|
-
if (aiLoggingPending(listing)) console.log(`AI logging publish is pending for ${listing.aiLogging.remaining} projects. Run void platform config plans sync --yes.`);
|
|
79
|
+
if (listing.aiLogging && aiLoggingPending(listing)) console.log(`AI logging publish is pending for ${listing.aiLogging.remaining} projects. Run void platform config plans sync --yes.`);
|
|
66
80
|
}
|
|
67
81
|
function showPreview(preview, before, beforeAiLogging, write = console.error) {
|
|
68
82
|
const after = preview.catalog;
|
|
@@ -73,6 +87,11 @@ function showPreview(preview, before, beforeAiLogging, write = console.error) {
|
|
|
73
87
|
from: planAiLogging$1(savedAiLogging, from),
|
|
74
88
|
to: planAiLogging$1(afterAiLogging, to)
|
|
75
89
|
} : void 0;
|
|
90
|
+
const caps = preview.securityCaps;
|
|
91
|
+
const securityCap = (from, to) => caps ? {
|
|
92
|
+
from: securityCapOf(caps.capsBefore, from),
|
|
93
|
+
to: securityCapOf(caps.caps, to)
|
|
94
|
+
} : void 0;
|
|
76
95
|
write(`Change: ${preview.action} ${preview.target}`);
|
|
77
96
|
write(`Accounts affected: ${preview.affectedAccounts}`);
|
|
78
97
|
const publish = preview.aiLoggingPublish;
|
|
@@ -87,18 +106,19 @@ function showPreview(preview, before, beforeAiLogging, write = console.error) {
|
|
|
87
106
|
for (const key of PLAN_EDITABLE_LIMIT_KEYS) write(` ${limitLabels[key]}: ${limitValue(plan.limits[key], key)}`);
|
|
88
107
|
write(` Short project slugs: ${shortSlugsLabel(plan.allowShortSlugs)}`);
|
|
89
108
|
if (afterAiLogging) write(` AI Gateway logging: ${planAiLogging$1(afterAiLogging, plan.id)}`);
|
|
109
|
+
if (caps) write(` Security scan cap: ${formatPlanSecurityCap(securityCapOf(caps.caps, plan.id))}`);
|
|
90
110
|
continue;
|
|
91
111
|
}
|
|
92
112
|
if (previous.name !== plan.name) write(`Name: ${previous.name} → ${plan.name}`);
|
|
93
113
|
if (previous.archived !== plan.archived) write(`${plan.id}: ${plan.archived ? "archive for new assignments" : "restore assignments"}`);
|
|
94
|
-
writePlanDiff(previous, plan, write, aiLogging(plan.id, plan.id));
|
|
114
|
+
writePlanDiff(previous, plan, write, aiLogging(plan.id, plan.id), securityCap(plan.id, plan.id));
|
|
95
115
|
}
|
|
96
116
|
for (const plan of before.plans) if (!after.plans.some((entry) => entry.id === plan.id)) {
|
|
97
117
|
write(`Remove ${label(plan)}`);
|
|
98
118
|
const replacement = after.plans.find((entry) => entry.id === preview.replacementPlanId);
|
|
99
119
|
if (replacement) {
|
|
100
120
|
write(`Move accounts to ${label(replacement)}`);
|
|
101
|
-
writePlanDiff(plan, replacement, write, aiLogging(plan.id, replacement.id));
|
|
121
|
+
writePlanDiff(plan, replacement, write, aiLogging(plan.id, replacement.id), securityCap(plan.id, replacement.id));
|
|
102
122
|
}
|
|
103
123
|
}
|
|
104
124
|
for (const account of preview.overLimitAccounts ?? []) write(`Already above proposed limits: ${stripVTControlCharacters(account.login)} (${account.id}): ${account.reasons.join(", ")}`);
|
|
@@ -125,21 +145,17 @@ async function choosePlan(catalog, message, options = {}) {
|
|
|
125
145
|
}));
|
|
126
146
|
}
|
|
127
147
|
async function changesInput(args, plan, listing) {
|
|
148
|
+
const cap = args.securityCap === void 0 ? {} : { securityCap: args.securityCap };
|
|
128
149
|
if (args.file) {
|
|
129
150
|
const input = JSON.parse(await readFile(args.file, "utf8"));
|
|
130
151
|
if (!input || typeof input !== "object" || Array.isArray(input)) throw new Error("platform: A plan file must contain a JSON object.");
|
|
131
152
|
const object = input;
|
|
132
|
-
for (const key of Object.keys(object)) if (!
|
|
133
|
-
"name",
|
|
134
|
-
"limits",
|
|
135
|
-
"buildInstanceType",
|
|
136
|
-
"allowShortSlugs",
|
|
137
|
-
"aiLogging"
|
|
138
|
-
].includes(key)) throw new Error(`platform: Unknown plan field ${key}. Use name, limits, buildInstanceType, allowShortSlugs, or aiLogging.`);
|
|
153
|
+
for (const key of Object.keys(object)) if (!PLAN_FILE_FIELDS.includes(key)) throw new Error(`platform: Unknown plan field ${key}. Use ${PLAN_FILE_FIELDS.slice(0, -1).join(", ")}, or securityCap.`);
|
|
139
154
|
try {
|
|
140
155
|
parsePlanAiLoggingInput(object.aiLogging);
|
|
156
|
+
parsePlanSecurityCapInput(object.securityCap);
|
|
141
157
|
} catch (error) {
|
|
142
|
-
throw new Error(`platform: ${error.message}
|
|
158
|
+
throw new Error(`platform: ${error.message}`, { cause: error });
|
|
143
159
|
}
|
|
144
160
|
if (object.allowShortSlugs !== void 0 && typeof object.allowShortSlugs !== "boolean") throw new Error("platform: allowShortSlugs must be a boolean.");
|
|
145
161
|
return {
|
|
@@ -147,18 +163,29 @@ async function changesInput(args, plan, listing) {
|
|
|
147
163
|
...object.name !== void 0 ? { name: parsePlanName(object.name) } : {},
|
|
148
164
|
...object.buildInstanceType !== void 0 ? { buildInstanceType: parseBuildInstanceType(object.buildInstanceType) } : {},
|
|
149
165
|
...object.limits !== void 0 ? { limits: parsePlanLimitsPatch(object.limits) } : {},
|
|
150
|
-
...args.name ? { name: parsePlanName(args.name) } : {}
|
|
166
|
+
...args.name ? { name: parsePlanName(args.name) } : {},
|
|
167
|
+
...cap
|
|
151
168
|
};
|
|
152
169
|
}
|
|
153
|
-
if (args.name) return {
|
|
170
|
+
if (args.name) return {
|
|
171
|
+
name: parsePlanName(args.name),
|
|
172
|
+
...cap
|
|
173
|
+
};
|
|
174
|
+
if (args.action === "set" && args.securityCap !== void 0) return cap;
|
|
154
175
|
if (!process.stdin.isTTY || args.json) {
|
|
155
176
|
if (args.action === "add") throw new Error("platform: Supply --name or --file when adding a plan in non-interactive mode.");
|
|
156
177
|
throw new Error("platform: Supply --name or --file with the changes in non-interactive mode.");
|
|
157
178
|
}
|
|
158
|
-
if (args.action === "add") return {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
179
|
+
if (args.action === "add") return {
|
|
180
|
+
name: parsePlanName(value(await text({
|
|
181
|
+
message: "Plan name:",
|
|
182
|
+
initialValue: args.target
|
|
183
|
+
}))),
|
|
184
|
+
...cap
|
|
185
|
+
};
|
|
186
|
+
if (!plan) throw new Error("platform: No plan selected.");
|
|
187
|
+
const aiLogging = listing?.aiLogging;
|
|
188
|
+
const securityCaps = listing?.securityCaps;
|
|
162
189
|
const field = value(await select({
|
|
163
190
|
message: "What would you like to change?",
|
|
164
191
|
options: [
|
|
@@ -174,20 +201,31 @@ async function changesInput(args, plan, listing) {
|
|
|
174
201
|
value: "buildInstanceType",
|
|
175
202
|
label: "Build instance size"
|
|
176
203
|
},
|
|
177
|
-
...
|
|
204
|
+
...aiLogging ? [{
|
|
178
205
|
value: "aiLogging",
|
|
179
|
-
label: `AI Gateway logging: ${planAiLogging$1(
|
|
206
|
+
label: `AI Gateway logging: ${planAiLogging$1(aiLogging.modes, plan.id)}`
|
|
207
|
+
}] : [],
|
|
208
|
+
...securityCaps ? [{
|
|
209
|
+
value: "securityCap",
|
|
210
|
+
label: `Security scan cap: ${formatPlanSecurityCap(securityCapOf(securityCaps, plan.id))}`
|
|
180
211
|
}] : []
|
|
181
212
|
]
|
|
182
213
|
}));
|
|
183
|
-
if (field === "
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
214
|
+
if (field === "securityCap") {
|
|
215
|
+
if (!securityCaps) throw new Error("platform: Security scan caps are unavailable.");
|
|
216
|
+
return { securityCap: await chooseSecurityCap(securityCapOf(securityCaps, plan.id)) };
|
|
217
|
+
}
|
|
218
|
+
if (field === "aiLogging") {
|
|
219
|
+
if (!aiLogging) throw new Error("platform: AI Gateway logging is unavailable.");
|
|
220
|
+
return { aiLogging: value(await select({
|
|
221
|
+
message: "AI Gateway logging for projects on this plan without a project setting:",
|
|
222
|
+
initialValue: planAiLogging$1(aiLogging.modes, plan.id),
|
|
223
|
+
options: AI_LOGGING_MODES.map((mode) => ({
|
|
224
|
+
value: mode,
|
|
225
|
+
label: aiLoggingLabels[mode]
|
|
226
|
+
}))
|
|
227
|
+
})) };
|
|
228
|
+
}
|
|
191
229
|
if (field === "name") return { name: parsePlanName(value(await text({
|
|
192
230
|
message: "Plan name:",
|
|
193
231
|
initialValue: plan.name
|
|
@@ -211,9 +249,45 @@ async function changesInput(args, plan, listing) {
|
|
|
211
249
|
}));
|
|
212
250
|
return { limits: parsePlanLimitsPatch({ [field]: Number(input) }) };
|
|
213
251
|
}
|
|
252
|
+
/** The interactive scan cap picker: policy default, an amount, or no cap. */
|
|
253
|
+
async function chooseSecurityCap(current) {
|
|
254
|
+
const mode = value(await select({
|
|
255
|
+
message: "Monthly security scan cap for each project on this plan:",
|
|
256
|
+
initialValue: typeof current === "number" ? "amount" : current,
|
|
257
|
+
options: [
|
|
258
|
+
{
|
|
259
|
+
value: "inherit",
|
|
260
|
+
label: "Policy default (the default project cap, when it is on)"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
value: "amount",
|
|
264
|
+
label: "A monthly amount in USD"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
value: "none",
|
|
268
|
+
label: "No cap"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}));
|
|
272
|
+
if (mode !== "amount") return mode;
|
|
273
|
+
const input = value(await text({
|
|
274
|
+
message: "USD per project per month:",
|
|
275
|
+
initialValue: typeof current === "number" ? String(current / 100) : "",
|
|
276
|
+
validate: (entry) => {
|
|
277
|
+
try {
|
|
278
|
+
parsePlanSecurityCapInput(entry?.trim() ? Number(entry) : NaN);
|
|
279
|
+
return;
|
|
280
|
+
} catch {
|
|
281
|
+
return "Enter a USD amount with at most two decimals.";
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
return Number(input);
|
|
286
|
+
}
|
|
214
287
|
async function apply(client, path, body, args, listing) {
|
|
215
288
|
const { catalog } = listing;
|
|
216
289
|
assertPlanAiLoggingSupported(listing, body);
|
|
290
|
+
if (body.securityCap !== void 0 && !listing.securityCaps) throw new Error("platform: This platform does not support plan security scan caps. Upgrade the platform first with `void platform upgrade`.");
|
|
217
291
|
if (!args.plan && !args.yes && (!process.stdin.isTTY || args.json)) throw new Error("platform: Configuration changes require --yes or --plan in non-interactive mode.");
|
|
218
292
|
const preview = await client.request(path, {
|
|
219
293
|
method: "POST",
|
|
@@ -249,7 +323,7 @@ async function apply(client, path, body, args, listing) {
|
|
|
249
323
|
while (true) {
|
|
250
324
|
const reconciliation = result.reconciliation;
|
|
251
325
|
const aiLogging = result.aiLoggingPublish;
|
|
252
|
-
if (aiLogging && Number.isSafeInteger(aiLogging.processed)) published += aiLogging.processed;
|
|
326
|
+
if (aiLogging?.processed !== void 0 && Number.isSafeInteger(aiLogging.processed)) published += aiLogging.processed;
|
|
253
327
|
if (typeof aiLogging?.expectedBy === "string") expectedBy = aiLogging.expectedBy;
|
|
254
328
|
const accountsPending = reconciliation?.complete === false;
|
|
255
329
|
if (!accountsPending && aiLogging?.complete !== false && !aiLogging?.error) break;
|
|
@@ -301,7 +375,7 @@ async function save(client, path, body) {
|
|
|
301
375
|
}
|
|
302
376
|
/** A sync step that wrote something and reported no error. */
|
|
303
377
|
function progressed(progress) {
|
|
304
|
-
return !progress.error && Number.isSafeInteger(progress.processed) && progress.processed > 0;
|
|
378
|
+
return !progress.error && progress.processed !== void 0 && Number.isSafeInteger(progress.processed) && progress.processed > 0;
|
|
305
379
|
}
|
|
306
380
|
async function runPlatformPlansConfig(args) {
|
|
307
381
|
const origin = resolveOperatorOrigin(args.connection);
|
|
@@ -358,6 +432,7 @@ async function runPlatformPlansConfig(args) {
|
|
|
358
432
|
});
|
|
359
433
|
}
|
|
360
434
|
const plan = catalog.plans.find((entry) => entry.id === selected);
|
|
435
|
+
if (!plan) throw new Error("platform: The selected plan is unavailable.");
|
|
361
436
|
const action = value(await select({
|
|
362
437
|
message: label(plan),
|
|
363
438
|
options: [
|
|
@@ -401,6 +476,8 @@ async function runPlatformPlansConfig(args) {
|
|
|
401
476
|
console.log(`Short project slugs: ${shortSlugsLabel(plan.allowShortSlugs)}`);
|
|
402
477
|
for (const key of PLAN_EDITABLE_LIMIT_KEYS) console.log(`${limitLabels[key]}: ${limitValue(plan.limits[key], key)}`);
|
|
403
478
|
if (typeof result.aiLogging === "string") console.log(`AI Gateway logging: ${stripVTControlCharacters(result.aiLogging)}`);
|
|
479
|
+
const securityCap = result.securityCap === "inherit" || result.securityCap === "none" ? result.securityCap : readStoredPlanSecurityCap(result.securityCap);
|
|
480
|
+
if (result.securityCap !== void 0 && securityCap !== void 0) console.log(`Security scan cap: ${formatPlanSecurityCap(securityCap)}`);
|
|
404
481
|
const publish = result.aiLoggingPublish;
|
|
405
482
|
if (publish && publish.complete === false) console.log(`AI logging publish pending: ${publish.remaining ?? 0} projects remaining${publish.error ? ` (${stripVTControlCharacters(publish.error)})` : ""}. Run void platform config plans sync --yes.`);
|
|
406
483
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as cfAccessHeaders } from "./cf-access-
|
|
2
|
-
import {
|
|
3
|
-
import { a as recoverDurablyMarkedProvisionIntents,
|
|
4
|
-
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-
|
|
1
|
+
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
2
|
+
import { N as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-fau3VKv6.mjs";
|
|
3
|
+
import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-CnKBdDx5.mjs";
|
|
4
|
+
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
// src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -14,7 +14,7 @@ async function recoverPlatformInstallations(client, accountId, verifyEndpoint =
|
|
|
14
14
|
try {
|
|
15
15
|
manifest = parsePlatformInstallationManifest(JSON.parse(value));
|
|
16
16
|
} catch (error) {
|
|
17
|
-
throw new Error(`platform: Routing namespace ${namespace.name} contains invalid Void ownership metadata: ${error instanceof Error ? error.message : String(error)}
|
|
17
|
+
throw new Error(`platform: Routing namespace ${namespace.name} contains invalid Void ownership metadata: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
18
18
|
}
|
|
19
19
|
if (selector && manifest.id !== selector && manifest.deployment.installationSlug !== selector && manifest.deployment.displayName.toLowerCase() !== selector.toLowerCase()) continue;
|
|
20
20
|
const routing = manifest.resources.find((resource) => resource.key === "routing-kv");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a as join, c as resolve } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
3
|
+
import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
3
4
|
import { closeSync, mkdirSync, openSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4
5
|
import { parsePlatformInstallationManifest } from "@void/platform";
|
|
5
6
|
import { createCipheriv, createDecipheriv, createHash, randomBytes } from "node:crypto";
|
|
@@ -63,6 +64,7 @@ function platformConnectionId(apiUrl) {
|
|
|
63
64
|
function platformCredentialAccount(apiUrl) {
|
|
64
65
|
return `platform:${createHash("sha256").update(normalizePlatformApiUrl(apiUrl)).digest("hex")}`;
|
|
65
66
|
}
|
|
67
|
+
const optionalString = (input) => typeof input === "string" && input !== "" ? input : null;
|
|
66
68
|
function parseConnection(value) {
|
|
67
69
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("platform: Invalid connection entry in the local registry.");
|
|
68
70
|
const entry = value;
|
|
@@ -72,7 +74,6 @@ function parseConnection(value) {
|
|
|
72
74
|
if (entry.kind !== "connected" && entry.kind !== "installed") throw new Error("platform: Invalid connection kind in the local registry.");
|
|
73
75
|
const lastUsedAt = String(entry.lastUsedAt ?? "");
|
|
74
76
|
if (!Number.isFinite(Date.parse(lastUsedAt))) throw new Error("platform: Invalid connection timestamp in the local registry.");
|
|
75
|
-
const optionalString = (input) => typeof input === "string" && input !== "" ? input : null;
|
|
76
77
|
const proxyUrl = optionalString(entry.proxyUrl);
|
|
77
78
|
return {
|
|
78
79
|
accountId: optionalString(entry.accountId),
|
|
@@ -100,7 +101,7 @@ function readRegistry(directory) {
|
|
|
100
101
|
};
|
|
101
102
|
} catch (error) {
|
|
102
103
|
if (error.code === "ENOENT") return DEFAULT_REGISTRY;
|
|
103
|
-
throw new Error(`platform: Could not read ${join(directory, "registry.json")}: ${error instanceof Error ? error.message : String(error)}
|
|
104
|
+
throw new Error(`platform: Could not read ${join(directory, "registry.json")}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
function withRegistryLock(directory, operation) {
|
|
@@ -114,7 +115,7 @@ function withRegistryLock(directory, operation) {
|
|
|
114
115
|
descriptor = openSync(lockPath, "wx", 384);
|
|
115
116
|
} catch (error) {
|
|
116
117
|
if (error.code !== "EEXIST") throw error;
|
|
117
|
-
if (Date.now() - statSync(lockPath).mtimeMs < 6e5) throw new Error("platform: Another process is updating the platform registry.");
|
|
118
|
+
if (Date.now() - statSync(lockPath).mtimeMs < 6e5) throw new Error("platform: Another process is updating the platform registry.", { cause: error });
|
|
118
119
|
rmSync(lockPath, { force: true });
|
|
119
120
|
descriptor = openSync(lockPath, "wx", 384);
|
|
120
121
|
}
|
|
@@ -162,7 +163,7 @@ function acquirePlatformLifecycleLock(accountId, installationSlug, directory = p
|
|
|
162
163
|
} catch {
|
|
163
164
|
stale = Date.now() - statSync(lockPath).mtimeMs > 72e5;
|
|
164
165
|
}
|
|
165
|
-
if (!stale) throw new Error(`platform: Another lifecycle operation is active for ${installationSlug} in account ${accountId}
|
|
166
|
+
if (!stale) throw new Error(`platform: Another lifecycle operation is active for ${installationSlug} in account ${accountId}.`, { cause: error });
|
|
166
167
|
rmSync(lockPath, { force: true });
|
|
167
168
|
return acquire();
|
|
168
169
|
}
|
|
@@ -270,7 +271,7 @@ function listInstallationManifests(directory = platformRegistryDirectory()) {
|
|
|
270
271
|
try {
|
|
271
272
|
manifests.push(parsePlatformInstallationManifest(JSON.parse(readFileSync(path, "utf8"))));
|
|
272
273
|
} catch (error) {
|
|
273
|
-
throw new Error(`platform: Invalid installation manifest ${path}: ${error instanceof Error ? error.message : String(error)}
|
|
274
|
+
throw new Error(`platform: Invalid installation manifest ${path}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
274
275
|
}
|
|
275
276
|
}
|
|
276
277
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as log, tt as isCancel } from "./dist-
|
|
2
|
-
import { u as openBrowser } from "./auth-
|
|
3
|
-
import {
|
|
1
|
+
import { L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
+
import { u as openBrowser } from "./auth-DlLDymuc.mjs";
|
|
3
|
+
import { h as import_picocolors, u as formatLink } from "./output-BZLnu0z8.mjs";
|
|
4
4
|
// src/cli/platform-plan-writes.ts
|
|
5
5
|
function planCreatesZone(plan) {
|
|
6
6
|
return plan.actions.some((action) => action.kind === "zone" && action.action === "create");
|
|
@@ -22,11 +22,11 @@ function platformPromptAnswer(value) {
|
|
|
22
22
|
function platformSetupLink(page) {
|
|
23
23
|
return formatLink(import_picocolors.default.underline(page.title), page.url);
|
|
24
24
|
}
|
|
25
|
+
const docs = (page, section, title) => platformSetupLink({
|
|
26
|
+
title,
|
|
27
|
+
url: `https://void.cloud/guide/platform/installation/${page}#${section}`
|
|
28
|
+
});
|
|
25
29
|
function platformSetupFieldHelp(key) {
|
|
26
|
-
const docs = (page, section, title) => platformSetupLink({
|
|
27
|
-
title,
|
|
28
|
-
url: `https://void.cloud/guide/platform/installation/${page}#${section}`
|
|
29
|
-
});
|
|
30
30
|
switch (key) {
|
|
31
31
|
case "databaseUrl": return {
|
|
32
32
|
placeholder: "postgresql://user:pw@…/database",
|
|
@@ -40,7 +40,8 @@ function platformSetupFieldHelp(key) {
|
|
|
40
40
|
default: return;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
const confirmWorkersAdmin = "Confirm Workers → Admin is selected for the account.";
|
|
44
|
+
/** Account-token links accept canonical permission group IDs as well as short keys. */
|
|
44
45
|
function platformAccountTokenPermissions(includeAiGateway) {
|
|
45
46
|
return [
|
|
46
47
|
{
|
|
@@ -48,7 +49,7 @@ function platformAccountTokenPermissions(includeAiGateway) {
|
|
|
48
49
|
type: "read"
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
|
-
key: "
|
|
52
|
+
key: "98d78cd2433d4c3687191bc0244ef948",
|
|
52
53
|
type: "edit"
|
|
53
54
|
},
|
|
54
55
|
{
|
|
@@ -107,6 +108,13 @@ function platformManagementSetupPage(plan, options) {
|
|
|
107
108
|
const appAccessLevel = appAccess ? "edit" : accessLevel;
|
|
108
109
|
const permissions = [
|
|
109
110
|
...platformAccountTokenPermissions(true),
|
|
111
|
+
...plan.deployment.capabilities.securityAudits ? [{
|
|
112
|
+
key: "containers",
|
|
113
|
+
type: "edit"
|
|
114
|
+
}, {
|
|
115
|
+
key: "cloudchamber",
|
|
116
|
+
type: "edit"
|
|
117
|
+
}] : [],
|
|
110
118
|
...zoneName || apiHostname || createsZone ? [
|
|
111
119
|
{
|
|
112
120
|
key: "zone",
|
|
@@ -151,6 +159,7 @@ function platformManagementSetupPage(plan, options) {
|
|
|
151
159
|
instructions: [
|
|
152
160
|
"This token lets the Void CLI install your platform. Void will now open a pre-configured token creation site. Please review the permissions and then paste the token here.",
|
|
153
161
|
`Scope it to ${plan.account.name}.`,
|
|
162
|
+
confirmWorkersAdmin,
|
|
154
163
|
...createsZone ? [`Keep the zone policy on All Domains so Void can create ${zoneName}.`] : zones.length ? [specifiedDomainsInstruction(zones)] : []
|
|
155
164
|
].join("\n")
|
|
156
165
|
};
|
|
@@ -166,7 +175,7 @@ function platformSetupPages(plan) {
|
|
|
166
175
|
key: "ssl_and_certificates",
|
|
167
176
|
type: "edit"
|
|
168
177
|
}] : [],
|
|
169
|
-
...plan.deployment.capabilities.sandbox ? [{
|
|
178
|
+
...plan.deployment.capabilities.sandbox || plan.deployment.capabilities.securityAudits ? [{
|
|
170
179
|
key: "containers",
|
|
171
180
|
type: "edit"
|
|
172
181
|
}, {
|
|
@@ -206,7 +215,11 @@ function platformSetupPages(plan) {
|
|
|
206
215
|
name: plan.deployment.displayName + " Runtime",
|
|
207
216
|
permissionGroupKeys: JSON.stringify(permissions)
|
|
208
217
|
}),
|
|
209
|
-
instructions: [
|
|
218
|
+
instructions: [
|
|
219
|
+
"Create a Cloudflare runtime token that Void can use to manage the platform. Please review the permissions and then paste the token here.",
|
|
220
|
+
confirmWorkersAdmin,
|
|
221
|
+
...zoneName && plansZoneCreation(plan) ? [`Keep the zone policy on All Domains so the token can purge cache on ${zoneName} after Void creates it.`] : zoneName ? [specifiedDomainsInstruction([zoneName, ...plan.deployment.capabilities.email ? ["every zone that will carry mail"] : []])] : []
|
|
222
|
+
].join("\n")
|
|
210
223
|
},
|
|
211
224
|
github: {
|
|
212
225
|
title: "GitHub OAuth App",
|
|
@@ -279,6 +292,7 @@ function platformInstallCommandArguments(options) {
|
|
|
279
292
|
parts.push(options.authentication.accessProtection ? "--access-protection" : "--no-access-protection");
|
|
280
293
|
}
|
|
281
294
|
flag("--dashboard-url", options.dashboardUrl ?? "");
|
|
295
|
+
if (options.securityAudits) parts.push("--security-audits");
|
|
282
296
|
flag("--runtime", options.runtime);
|
|
283
297
|
flag("--runtime-logs", options.runtimeLogs ?? "");
|
|
284
298
|
flag("--storage-location", options.storageLocation ?? "");
|
|
@@ -288,7 +302,7 @@ function platformInstallCommandArguments(options) {
|
|
|
288
302
|
function formatPlatformInstallCommand(options) {
|
|
289
303
|
return platformInstallCommandArguments(options).map((value) => {
|
|
290
304
|
if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(value)) return value;
|
|
291
|
-
return process.platform === "win32" ? `'${value.replaceAll("'", "''")}'` : `'${value.replaceAll("'",
|
|
305
|
+
return process.platform === "win32" ? `'${value.replaceAll("'", "''")}'` : `'${value.replaceAll("'", String.raw`'\''`)}'`;
|
|
292
306
|
}).join(" ");
|
|
293
307
|
}
|
|
294
308
|
function openPlatformSetupPage(page, dependencies = {}) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as join, l as toSlash, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename,
|
|
3
|
-
import { a as unwrapStaticExpression, c as walk, i as staticLiteral, s as bindingResolver } from "./static-exports-
|
|
4
|
-
import { a as
|
|
5
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
2
|
+
import { S as globSync, _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename, y as parseWebSocketFilename } from "./scan-Ct_SEzH4.mjs";
|
|
3
|
+
import { a as unwrapStaticExpression, c as walk, i as staticLiteral, s as bindingResolver } from "./static-exports-s7P86Ngp.mjs";
|
|
4
|
+
import { a as isMemberExpression, i as isLiteral, n as isCallExpression, o as isObjectExpression, r as isIdentifier, t as asAstProgram } from "./ast-BkPQu7A0.mjs";
|
|
5
|
+
import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
|
|
6
6
|
import { n as resourceNameWords, t as isResourceName } from "./resource-name-DlJ9QXzg.mjs";
|
|
7
|
-
import { r as getSsrServerEntryPath } from "./entry-
|
|
7
|
+
import { r as getSsrServerEntryPath } from "./entry-Bwb9ev8K.mjs";
|
|
8
8
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
9
|
import { parseSync } from "vite";
|
|
10
10
|
// src/application-features.ts
|
|
@@ -37,7 +37,7 @@ function conventionFileGlobs(scanDir, pattern, conventionDir = scanDir) {
|
|
|
37
37
|
return patterns;
|
|
38
38
|
}
|
|
39
39
|
function isConventionPath(filePath) {
|
|
40
|
-
return filePath.
|
|
40
|
+
return filePath.replaceAll("\\", "/").split("/").every((segment, index) => !segment.startsWith("_") && (!segment.startsWith(".") || index === 0 && segment === WELL_KNOWN_DIR));
|
|
41
41
|
}
|
|
42
42
|
/** Whether a path relative to routes/ participates in HTTP or WebSocket routing. */
|
|
43
43
|
function isRouteFile(filePath) {
|
|
@@ -66,7 +66,7 @@ function listRouteFiles(dir) {
|
|
|
66
66
|
function readResourceDefinition(filename, source, helpers) {
|
|
67
67
|
let program;
|
|
68
68
|
try {
|
|
69
|
-
program = parseSync(filename, source).program;
|
|
69
|
+
program = asAstProgram(parseSync(filename, source).program);
|
|
70
70
|
} catch {
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
@@ -212,7 +212,7 @@ const CLIENT_MODULES = /* @__PURE__ */ new Set([
|
|
|
212
212
|
function name(node) {
|
|
213
213
|
return isIdentifier(node) ? node.name : staticLiteral(node);
|
|
214
214
|
}
|
|
215
|
-
function propertyName(node) {
|
|
215
|
+
function propertyName$1(node) {
|
|
216
216
|
const key = node.property ?? node.key;
|
|
217
217
|
return node.computed ? staticLiteral(key) : name(key);
|
|
218
218
|
}
|
|
@@ -230,7 +230,7 @@ function inferClientAuth(parsed, code) {
|
|
|
230
230
|
if (entry.importName.name === "auth" || entry.importName.kind === "All" || entry.importName.kind === "AllButDefault") return true;
|
|
231
231
|
}
|
|
232
232
|
if (!hasNamespace && parsed.module.dynamicImports.length === 0 || !/\bauth\b|\\(?:u|x|h|[0-7\r\n\u2028\u2029])/.test(code)) return false;
|
|
233
|
-
return inferNamespaceAuth(parsed.program);
|
|
233
|
+
return inferNamespaceAuth(asAstProgram(parsed.program));
|
|
234
234
|
}
|
|
235
235
|
function inferNamespaceAuth(program) {
|
|
236
236
|
const namespaces = /* @__PURE__ */ new Set();
|
|
@@ -249,7 +249,7 @@ function inferNamespaceAuth(program) {
|
|
|
249
249
|
}
|
|
250
250
|
const reads = [];
|
|
251
251
|
const resolve = bindingResolver(program, { visit(node) {
|
|
252
|
-
if (isMemberExpression(node) && propertyName(node) === "auth") reads.push(node.object);
|
|
252
|
+
if (isMemberExpression(node) && propertyName$1(node) === "auth") reads.push(node.object);
|
|
253
253
|
else if ([
|
|
254
254
|
"VariableDeclarator",
|
|
255
255
|
"AssignmentExpression",
|
|
@@ -257,7 +257,7 @@ function inferNamespaceAuth(program) {
|
|
|
257
257
|
].includes(node.type)) {
|
|
258
258
|
const pattern = node.id ?? node.left;
|
|
259
259
|
const value = node.init ?? node.right;
|
|
260
|
-
if (pattern?.type === "ObjectPattern" && (pattern.properties ?? []).some((property) => property.type === "Property" && propertyName(property) === "auth")) reads.push(value);
|
|
260
|
+
if (pattern?.type === "ObjectPattern" && (pattern.properties ?? []).some((property) => property.type === "Property" && propertyName$1(property) === "auth")) reads.push(value);
|
|
261
261
|
}
|
|
262
262
|
return isIdentifier(node);
|
|
263
263
|
} });
|
|
@@ -299,6 +299,15 @@ function inferNamespaceAuth(program) {
|
|
|
299
299
|
// src/inference/walk.ts
|
|
300
300
|
const ENV_BINDING_RE = /\benv\b|\\(?:u|x|[0-7\r\n\u2028\u2029])/;
|
|
301
301
|
const RESOURCE_BINDING_RE = /\b(?:DB\b|KV\b|STORAGE\b|AI\b|SANDBOX\b|QUEUE_)|\\(?:u|x|[0-7A-Z_\r\n\u2028\u2029])/;
|
|
302
|
+
function propertyName(node) {
|
|
303
|
+
const key = node.property ?? node.key;
|
|
304
|
+
const name = !node.computed && isIdentifier(key) ? key.name : staticLiteral(key);
|
|
305
|
+
return typeof name === "string" ? name : void 0;
|
|
306
|
+
}
|
|
307
|
+
function isEnv(node) {
|
|
308
|
+
node = unwrapStaticExpression(node);
|
|
309
|
+
return isIdentifier(node) && node.name === "env" || isMemberExpression(node) && propertyName(node) === "env";
|
|
310
|
+
}
|
|
302
311
|
/**
|
|
303
312
|
* Infer which Cloudflare bindings a source file uses.
|
|
304
313
|
*
|
|
@@ -363,15 +372,6 @@ function inferBindingsFromSource(code, filename) {
|
|
|
363
372
|
}
|
|
364
373
|
if (hasClientModule) result.needsAuth ||= inferClientAuth(parsed, code);
|
|
365
374
|
if (!ENV_BINDING_RE.test(code) || !RESOURCE_BINDING_RE.test(code)) return result;
|
|
366
|
-
function propertyName(node) {
|
|
367
|
-
const key = node.property ?? node.key;
|
|
368
|
-
const name = !node.computed && isIdentifier(key) ? key.name : staticLiteral(key);
|
|
369
|
-
return typeof name === "string" ? name : void 0;
|
|
370
|
-
}
|
|
371
|
-
function isEnv(node) {
|
|
372
|
-
node = unwrapStaticExpression(node);
|
|
373
|
-
return isIdentifier(node) && node.name === "env" || isMemberExpression(node) && propertyName(node) === "env";
|
|
374
|
-
}
|
|
375
375
|
function recordBinding(name) {
|
|
376
376
|
switch (name) {
|
|
377
377
|
case "DB":
|
|
@@ -433,16 +433,16 @@ function mergeBindings(bindings) {
|
|
|
433
433
|
// src/router/websocket.ts
|
|
434
434
|
const WEBSOCKET_ROUTE_RE = new RegExp(`(?:\\.(?:dev|prod))?\\.ws\\.(?:${ROUTE_EXTENSIONS.join("|")})$`);
|
|
435
435
|
function isWebSocketRouteFile(filePath) {
|
|
436
|
-
return WEBSOCKET_ROUTE_RE.test(filePath.
|
|
436
|
+
return WEBSOCKET_ROUTE_RE.test(filePath.replaceAll("\\", "/"));
|
|
437
437
|
}
|
|
438
438
|
function identifierWords(segment) {
|
|
439
|
-
return segment.
|
|
439
|
+
return segment.replaceAll(/^\(\s*|\s*\)$/g, "").replace(/^\[\.\.\.(.+)\]$/, "$1").replace(/^\[(.+)\]$/, "$1").replace(/\.ws$/, "").replace(/\.(dev|prod)$/, "").replaceAll(/[^a-zA-Z0-9]+/g, " ").split(" ").filter(Boolean);
|
|
440
440
|
}
|
|
441
441
|
function deriveWebSocketClassNameFromName(name) {
|
|
442
442
|
return resourceNameWords(name).map((part) => part[0].toUpperCase() + part.slice(1)).join("") + "Ws";
|
|
443
443
|
}
|
|
444
444
|
function inferWebSocketResourceName(filePath) {
|
|
445
|
-
let normalized = filePath.
|
|
445
|
+
let normalized = filePath.replaceAll("\\", "/");
|
|
446
446
|
const extension = ROUTE_EXTENSIONS.find((ext) => normalized.endsWith(`.${ext}`));
|
|
447
447
|
if (extension) normalized = normalized.slice(0, -(extension.length + 1));
|
|
448
448
|
const parts = normalized.split("/").filter((segment) => segment.length > 0 && !(segment.startsWith("(") && segment.endsWith(")"))).flatMap(identifierWords);
|
|
@@ -459,7 +459,7 @@ function getPropertyName(node) {
|
|
|
459
459
|
}
|
|
460
460
|
const WEBSOCKET_HELPERS = /* @__PURE__ */ new Set(["defineRoom", "defineWebSocket"]);
|
|
461
461
|
function detectWebSocketDefinition(absPath) {
|
|
462
|
-
const definition = readResourceDefinition(absPath, readFileSync(absPath, "
|
|
462
|
+
const definition = readResourceDefinition(absPath, readFileSync(absPath, "utf8"), WEBSOCKET_HELPERS);
|
|
463
463
|
if (!definition) return null;
|
|
464
464
|
const hasAuthGate = isObjectExpression(definition.options) && (definition.options.properties ?? []).some((property) => property.type === "Property" && getPropertyName(property.key) === "onBeforeConnect");
|
|
465
465
|
return {
|
|
@@ -482,7 +482,7 @@ function buildWebSocketRoute(root, filePath, paths = readProjectPaths(root)) {
|
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
function parseWebSocketFiles(root, files, paths = readProjectPaths(root), environment) {
|
|
485
|
-
const routes = files.filter((f) => isWebSocketRouteFile(f)).
|
|
485
|
+
const routes = files.filter((f) => isWebSocketRouteFile(f)).flatMap((filePath) => isRouteEnabledForEnvironment(parseWebSocketFilename(filePath), environment) ? [buildWebSocketRoute(root, filePath, paths)] : []).sort(compareRouteSpecificity);
|
|
486
486
|
const byClass = /* @__PURE__ */ new Map();
|
|
487
487
|
for (const route of routes) {
|
|
488
488
|
const previous = byClass.get(route.className) ?? [];
|
|
@@ -571,7 +571,7 @@ const FRAMEWORK_PACKAGES = {
|
|
|
571
571
|
function detectFramework(root) {
|
|
572
572
|
let pkg;
|
|
573
573
|
try {
|
|
574
|
-
pkg = JSON.parse(readFileSync(join(root, "package.json"), "
|
|
574
|
+
pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
575
575
|
} catch {
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
3
|
-
import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-
|
|
4
|
-
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-
|
|
5
|
-
import { c as getDatabaseCasing, p as readConfig } from "./config-
|
|
6
|
-
import { t as discoverSchema } from "./discover-
|
|
7
|
-
import { c as loadLocalEnv } from "./env-
|
|
8
|
-
import { n as generateQueueTypes, o as generateBindingTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-
|
|
9
|
-
import { n as generateDbDts } from "./db-types-
|
|
10
|
-
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-
|
|
11
|
-
import { i as
|
|
2
|
+
import { t as analyzeApplication } from "./application-routing-BAXpnawu.mjs";
|
|
3
|
+
import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-BFX5ZB1J.mjs";
|
|
4
|
+
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BJDMPrj7.mjs";
|
|
5
|
+
import { c as getDatabaseCasing, p as readConfig } from "./config-Dv5jri1-.mjs";
|
|
6
|
+
import { t as discoverSchema } from "./discover-IcspacCg.mjs";
|
|
7
|
+
import { c as loadLocalEnv } from "./env-EjHqc7m9.mjs";
|
|
8
|
+
import { n as generateQueueTypes, o as generateBindingTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-CSed9-Dp.mjs";
|
|
9
|
+
import { n as generateDbDts } from "./db-types-B4Cf9dzR.mjs";
|
|
10
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-D2hBodXP.mjs";
|
|
11
|
+
import { i as ensureProjectTsconfig, o as writeFileIfChanged } from "./project-tsconfig-BOA4ym99.mjs";
|
|
12
12
|
import { existsSync, rmSync } from "node:fs";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
// src/codegen/prepare.ts
|
|
@@ -47,11 +47,11 @@ async function prepareProject(root) {
|
|
|
47
47
|
if (existsSync(paths.queuesDir)) writeGeneratedFile(outDir, "queues.d.ts", generateQueueTypes(scan.queues, paths.queuesDir, outDir), written);
|
|
48
48
|
else removeGeneratedFile(outDir, "queues.d.ts", removed);
|
|
49
49
|
const schema = discoverSchema(root, paths);
|
|
50
|
-
const hasDbRuntime = schema
|
|
50
|
+
const hasDbRuntime = schema !== null && schema !== void 0 || authEnabled || getDatabaseCasing(config) !== void 0;
|
|
51
51
|
if (hasDbRuntime) {
|
|
52
52
|
if (generateDbDts(outDir, schema, dialect)) written.push(join(".void", "db.d.ts"));
|
|
53
53
|
} else removeGeneratedFile(outDir, "db.d.ts", removed);
|
|
54
|
-
if (ensureProjectTsconfig(root, hasRouteTypes, hasDbRuntime, schema
|
|
54
|
+
if (ensureProjectTsconfig(root, hasRouteTypes, hasDbRuntime, schema !== null && schema !== void 0, { paths })) written.push(join(".void", "tsconfig.json"));
|
|
55
55
|
if (authEnabled) {
|
|
56
56
|
const authRuntime = {
|
|
57
57
|
dialect,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareProject } from "./prepare-BbvlKreR.mjs";
|