void 1.11.0 → 1.12.1
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-BU1Fy_Bf.mjs} +6 -6
- package/dist/{agents-DRo8gzni.mjs → agents-64FnLwxP.mjs} +6 -5
- package/dist/{application-analysis-XyUuNqYA.mjs → application-analysis-DVeN8yoi.mjs} +48 -22
- package/dist/{application-routing-DATqynKH.mjs → application-routing-KKw4Y84h.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-A7cZ8aXA.mjs} +1 -1
- package/dist/{auth-CCk9Seol.mjs → auth-CqwJwItO.mjs} +24 -12
- package/dist/{auth-link-CVxoyU81.mjs → auth-link-Duu2NvN5.mjs} +6 -6
- package/dist/{auth-router-ChXKduRM.mjs → auth-router-vgtOdb9j.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-B7OJ0U5R.mjs} +13 -12
- package/dist/build-id-4IV4hC1-.mjs +13 -0
- package/dist/{cache-B1WzZV60.mjs → cache-wSpi3aeM.mjs} +6 -6
- package/dist/{cancel-deploy-BggXixU_.mjs → cancel-deploy-DMWzkAlb.mjs} +5 -5
- package/dist/{cf-access-Dnyw8KFY.mjs → cf-access-DHklo7Rg.mjs} +41 -23
- package/dist/{cf-access-pejlJmuy.mjs → cf-access-DmkKPcAI.mjs} +0 -8
- package/dist/{cf-build-output-bBx1gDll.mjs → cf-build-output-Cso7Vh-t.mjs} +31 -27
- package/dist/cf-build-output-Wpk_e5CI.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/db-execute-process.d.mts +2 -0
- package/dist/cli/db-execute-process.mjs +57 -0
- 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-BrChcpE3.mjs} +152 -405
- package/dist/{client-DF6U7KLP.mjs → client-DE2m2ldh.mjs} +186 -17
- package/dist/{client-DGfZTE4V.mjs → client-eLZwqkPH.mjs} +1 -1
- 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-BIRQkYwL.mjs} +26 -28
- package/dist/cloudflare-operations-ByjFGats.mjs +1 -0
- 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-D0V0o40j.mjs} +9 -9
- package/dist/{create-project-DLUlxmf5.mjs → create-project-8FdN6D2i.mjs} +7 -6
- package/dist/{create-project-By7ymK7F.mjs → create-project-CbuDH5Hv.mjs} +1 -1
- package/dist/{db-3qsP21pH.mjs → db-BNPIjLkK.mjs} +1450 -154
- package/dist/db-args-BvMwAber.mjs +1 -0
- package/dist/db-args-CiQVg8SJ.mjs +321 -0
- 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-WtLEfap2.mjs} +6 -6
- package/dist/{deploy-2QjsBEGw.mjs → deploy-BgSbagIP.mjs} +218 -553
- package/dist/deploy-Do6FWqon.mjs +2 -0
- package/dist/{deploy-managed-static-JoNP3cec.mjs → deploy-managed-static-BWBsxOww.mjs} +115 -194
- package/dist/deploy-security-notice-IRGy6Edf.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-mweyYXSw.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-DcQNP40O.mjs} +33 -30
- package/dist/{email-cloudflare-DDknDAgp.mjs → email-cloudflare-DeYH3Ke7.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-DaAoYR2-.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-EMpnzNGz.mjs → gen-aOtHhZLD.mjs} +21 -18
- package/dist/gen-vhBDHs3q.mjs +1 -0
- 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-BR19Ffdz.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-DvClCzqL.mjs} +138 -60
- package/dist/help-fKPzcTJv.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 +344 -637
- package/dist/{info--jdAIsJN.mjs → info-P6MBiVJi.mjs} +4 -4
- package/dist/{init-BLZvktk_.mjs → init-C8YpkGIP.mjs} +124 -345
- package/dist/installed-packages-tfmYd-cC.mjs +198 -0
- package/dist/{isr-config-Czzb4mIq.mjs → isr-config-DiTnL9Tb.mjs} +5 -5
- package/dist/{link-DPJ4jN7y.mjs → link-Dyz9IGcM.mjs} +7 -7
- package/dist/{list-B-au6xJt.mjs → list-VGYBMjmx.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-CWFr-G2I.mjs} +8 -6
- package/dist/login-DECm3e9b.mjs +1 -0
- package/dist/{logs-UNH3vQeX.mjs → logs-kS1wuR4b.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/module-references-DWQmO6TW.mjs +27 -0
- package/dist/mysql-lock-D8xtnI-D.mjs +145 -0
- package/dist/mysql-sql-BIE7bc4Z.mjs +124 -0
- 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-DD0n6zc2.mjs} +11 -10
- package/dist/operator-args-nvetCWuz.mjs +1499 -0
- package/dist/{operator-auth-CD3pap65.mjs → operator-auth-DMvn-y9X.mjs} +2 -2
- package/dist/{operator-client-XvXTkea6.mjs → operator-client-dFNnXfyB.mjs} +6 -5
- package/dist/operator-cmd-CVfK5U0B.mjs +1 -0
- package/dist/{operator-cmd-CKbZbNKn.mjs → operator-cmd-a7yOf2tH.mjs} +33 -13
- package/dist/operator-security-D5MToU0p.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 +168 -38
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +8 -2
- package/dist/pages/index.mjs +283 -13
- 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-CMwMoiLp.mjs +1 -0
- package/dist/{platform-args-DQSMW4EP.mjs → platform-args-CvZSuhYS.mjs} +37 -9
- package/dist/{platform-auth-config-D80AKe72.mjs → platform-auth-config-CpszX-Ne.mjs} +26 -23
- package/dist/{platform-auth-protection-k1Ox-u9T.mjs → platform-auth-protection-DA6Tw8Og.mjs} +10 -10
- package/dist/{platform-auth-recovery-D-hKehPy.mjs → platform-auth-recovery-Cztrb1JC.mjs} +11 -9
- package/dist/{platform-cmd-DQ0Wi61H.mjs → platform-cmd-m6Asj6nO.mjs} +11 -11
- package/dist/{platform-cmd-Dtz5lw7R.mjs → platform-cmd-u1j88ggF.mjs} +1 -1
- package/dist/{platform-discovery-B0eZjZ3B.mjs → platform-discovery-CLxtixHJ.mjs} +1 -1
- package/dist/{platform-domain-BMGS4l74.mjs → platform-domain-DJSznNTA.mjs} +14 -10
- package/dist/{platform-lifecycle-y4AfmC7M.mjs → platform-lifecycle-BC-9p58d.mjs} +1 -1
- package/dist/{platform-lifecycle-BCkNQNsQ.mjs → platform-lifecycle-GFeXv3NC.mjs} +802 -207
- package/dist/platform-management-BwHkz46V.mjs +1 -0
- package/dist/{platform-management-Cj2aXFqD.mjs → platform-management-DX1zINou.mjs} +227 -58
- package/dist/{platform-plans-config-CrUUzEl9.mjs → platform-plans-config-DiydtNKY.mjs} +112 -35
- package/dist/{platform-recovery-DKZnALHI.mjs → platform-recovery-CnzBbudV.mjs} +5 -5
- package/dist/{platform-registry-DZ_2Xuqd.mjs → platform-registry-DHH6fivm.mjs} +6 -5
- package/dist/{platform-setup-CKmSEb1J.mjs → platform-setup-Lph9i-rh.mjs} +26 -12
- package/dist/{plugin-inference-B_urWd5Z.mjs → plugin-inference-COlq96WJ.mjs} +28 -53
- package/dist/prepare-DcwigRUS.mjs +1 -0
- package/dist/{prepare-CU7SZieQ.mjs → prepare-WvijE289.mjs} +3 -3
- package/dist/{prepare-vCdm5moJ.mjs → prepare-co1o1FFd.mjs} +12 -12
- package/dist/{project-cmd-B4cgPSi4.mjs → project-cmd-BWJTplpc.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-BV1xfj1K.mjs +1 -0
- package/dist/project-security-CY_aahvW.mjs +1340 -0
- package/dist/{project-team-BdX6anO3.mjs → project-team-BlIFXlmT.mjs} +8 -8
- package/dist/{project-token-C1rcq8Xb.mjs → project-token-CMsB7I1-.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-BI6pdpx4.mjs +210 -0
- package/dist/{protocol-W5EQcIzN.mjs → protocol-4rEnumif.mjs} +15 -8
- 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-Dyvuil0Q.mjs} +6 -3
- package/dist/{requests-D6MaLS_Y.mjs → requests-CfmJxNYg.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-DL5HuAsM.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-D549vGGm.mjs} +14 -9
- package/dist/{runner-mysql-C_PrAUTm.mjs → runner-mysql-DOjbj-N1.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 +2 -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-C-WBaUSS.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/jobs.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +40 -19
- package/docs/guide/pages-routing/errors.md +3 -1
- package/docs/guide/pages-routing/head.md +20 -2
- package/docs/guide/pages-routing/overview.md +20 -0
- 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 +7 -1
- 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 +11 -5
- 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/queues.md +1 -1
- 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/integrations/frameworks/sveltekit.md +1 -1
- package/docs/reference/api/handlers.md +3 -3
- package/docs/reference/api/pages.md +4 -0
- package/docs/reference/api/types.md +11 -1
- package/docs/reference/cli/database.md +42 -6
- 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 +6 -3
- package/docs/reference/cli/platform.md +1 -0
- package/docs/reference/cli/project.md +57 -0
- package/docs/reference/cli/setup.md +4 -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-operations-BditDbcd.mjs +0 -1
- 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/mysql-sql-SlpS6OMg.mjs +0 -239
- 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,392 +0,0 @@
|
|
|
1
|
-
import { t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-Ccl-zRhl.mjs";
|
|
2
|
-
import { a as join, c as resolve, n as dirname, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
3
|
-
import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
|
|
4
|
-
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-DvS6IFRv.mjs";
|
|
5
|
-
import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-DMgR7XOf.mjs";
|
|
6
|
-
import { existsSync } from "node:fs";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
import { spawnSync } from "node:child_process";
|
|
9
|
-
// src/cli/preset.ts
|
|
10
|
-
/**
|
|
11
|
-
* Known output conventions for SSGs.
|
|
12
|
-
* Keyed by the SSG name — detection iterates in insertion order.
|
|
13
|
-
*/
|
|
14
|
-
const SSG_PRESETS = {
|
|
15
|
-
vitepress: {
|
|
16
|
-
dep: "vitepress",
|
|
17
|
-
buildCommand: "vitepress build",
|
|
18
|
-
outputDir: ".vitepress/dist",
|
|
19
|
-
appType: "static",
|
|
20
|
-
resolve(root) {
|
|
21
|
-
if (existsSync(join(root, "docs/.vitepress"))) return {
|
|
22
|
-
buildCommand: "vitepress build docs",
|
|
23
|
-
outputDir: "docs/.vitepress/dist"
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
docusaurus: {
|
|
28
|
-
dep: "@docusaurus/core",
|
|
29
|
-
buildCommand: "docusaurus build",
|
|
30
|
-
outputDir: "build",
|
|
31
|
-
appType: "static"
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Known output conventions for meta-frameworks.
|
|
36
|
-
* Keyed by the framework name from `detectFramework()`.
|
|
37
|
-
*
|
|
38
|
-
* Class A frameworks (tanstack-start, react-router, vinext) use the project's
|
|
39
|
-
* Vite-compatible build command (`vite build` or `vp build`) and have their
|
|
40
|
-
* output structure determined by the framework's Vite plugin.
|
|
41
|
-
*
|
|
42
|
-
* Class B/C frameworks (sveltekit, nuxt, analog, astro) use their own build CLI
|
|
43
|
-
* and have framework-specific output conventions.
|
|
44
|
-
*/
|
|
45
|
-
const FRAMEWORK_PRESETS = {
|
|
46
|
-
"tanstack-start": {
|
|
47
|
-
cloudflareArtifact: "vite-plugin",
|
|
48
|
-
buildCommand: "vite build",
|
|
49
|
-
workerDir: "dist/server",
|
|
50
|
-
workerMain: "index.js",
|
|
51
|
-
assetsDir: "dist/client"
|
|
52
|
-
},
|
|
53
|
-
"react-router": {
|
|
54
|
-
cloudflareArtifact: "vite-plugin",
|
|
55
|
-
buildCommand: "vite build",
|
|
56
|
-
workerDir: "build/server",
|
|
57
|
-
workerMain: "index.js",
|
|
58
|
-
assetsDir: "build/client"
|
|
59
|
-
},
|
|
60
|
-
"vinext-app": {
|
|
61
|
-
cloudflareArtifact: "vite-plugin",
|
|
62
|
-
buildCommand: "vite build",
|
|
63
|
-
workerDir: "dist/server",
|
|
64
|
-
workerMain: "index.js",
|
|
65
|
-
assetsDir: "dist/client"
|
|
66
|
-
},
|
|
67
|
-
"vinext-pages": {
|
|
68
|
-
cloudflareArtifact: "vite-plugin",
|
|
69
|
-
buildCommand: "vite build",
|
|
70
|
-
workerDir: "dist/ssr",
|
|
71
|
-
workerMain: "index.js",
|
|
72
|
-
assetsDir: "dist/client"
|
|
73
|
-
},
|
|
74
|
-
sveltekit: {
|
|
75
|
-
cloudflareArtifact: "worker-output",
|
|
76
|
-
cloudflareCompatibilityFlags: ["nodejs_als"],
|
|
77
|
-
buildCommand: "vite build",
|
|
78
|
-
workerDir: ".svelte-kit/cloudflare",
|
|
79
|
-
workerMain: "_worker.js",
|
|
80
|
-
assetsDir: ".svelte-kit/cloudflare",
|
|
81
|
-
hashedAssetsPrefix: "_app/immutable",
|
|
82
|
-
bundle: true
|
|
83
|
-
},
|
|
84
|
-
nuxt: {
|
|
85
|
-
cloudflareArtifact: "worker-output",
|
|
86
|
-
cloudflareCompatibilityFlags: ["nodejs_als"],
|
|
87
|
-
buildCommand: "nuxt build",
|
|
88
|
-
workerDir: ".output/server",
|
|
89
|
-
workerMain: "index.mjs",
|
|
90
|
-
assetsDir: ".output/public",
|
|
91
|
-
hashedAssetsPrefix: "_nuxt"
|
|
92
|
-
},
|
|
93
|
-
analog: {
|
|
94
|
-
cloudflareArtifact: "worker-output",
|
|
95
|
-
cloudflareCompatibilityFlags: ["nodejs_compat", "nodejs_als"],
|
|
96
|
-
buildCommand: "vite build",
|
|
97
|
-
workerDir: "dist/analog/server",
|
|
98
|
-
workerMain: "index.mjs",
|
|
99
|
-
assetsDir: "dist/analog/public",
|
|
100
|
-
hashedAssetsPrefix: "assets"
|
|
101
|
-
},
|
|
102
|
-
astro: {
|
|
103
|
-
cloudflareArtifact: "worker-output",
|
|
104
|
-
cloudflareCompatibilityFlags: ["nodejs_als"],
|
|
105
|
-
buildCommand: "astro build",
|
|
106
|
-
workerDir: "dist/server",
|
|
107
|
-
workerMain: "entry.mjs",
|
|
108
|
-
assetsDir: "dist/client",
|
|
109
|
-
hashedAssetsPrefix: "_astro"
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Resolve a project-local command, rewriting `vite` to `vp` when the project
|
|
114
|
-
* depends on Vite+ and preferring node_modules/.bin when available.
|
|
115
|
-
*/
|
|
116
|
-
function resolveProjectCommand(root, command) {
|
|
117
|
-
const [bin, ...args] = command.trim().split(/\s+/);
|
|
118
|
-
const resolvedBin = shellQuoteExecutable(localBin(root, resolveCommandBin(root, bin)));
|
|
119
|
-
return args.length > 0 ? `${resolvedBin} ${args.join(" ")}` : resolvedBin;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Shell-quote a resolved executable path so it survives being concatenated into
|
|
123
|
-
* a command string. The deploy path runs these via `execSync`/`spawnSync`,
|
|
124
|
-
* which invoke a shell, so a bare absolute path containing a space (e.g. a
|
|
125
|
-
* project root like `/tmp/my app`) would be word-split by the shell and try to
|
|
126
|
-
* exec the wrong binary. Paths with no shell-significant characters are returned
|
|
127
|
-
* unchanged, so ordinary paths stay byte-identical and copy-pasteable; only the
|
|
128
|
-
* executable segment is quoted (the trailing subcommand args are known-safe
|
|
129
|
-
* tokens). Platform-aware: cmd.exe (Windows) uses double quotes, POSIX shells
|
|
130
|
-
* use single quotes.
|
|
131
|
-
*/
|
|
132
|
-
function shellQuoteExecutable(value) {
|
|
133
|
-
if (process.platform === "win32") return /[\s&|<>^()"]/.test(value) ? `"${value}"` : value;
|
|
134
|
-
if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(value)) return value;
|
|
135
|
-
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
136
|
-
}
|
|
137
|
-
/** Resolve the bundled cf transport without consulting project dependencies. */
|
|
138
|
-
function resolveCloudflareOperationArgv() {
|
|
139
|
-
const directory = dirname(fileURLToPath(import.meta.url));
|
|
140
|
-
const entry = [
|
|
141
|
-
join(directory, "cloudflare-operation-process.ts"),
|
|
142
|
-
join(directory, "cloudflare-operation-process.mjs"),
|
|
143
|
-
join(directory, "cli", "cloudflare-operation-process.mjs")
|
|
144
|
-
].find((candidate) => existsSync(candidate));
|
|
145
|
-
if (!entry) throw new Error(`Void's bundled Cloudflare tooling is unavailable. Reinstall the project's dependencies from its trusted lockfile, then retry.`);
|
|
146
|
-
return [process.execPath, entry];
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Format a user-facing command string, rewriting `vite` to `vp` when the
|
|
150
|
-
* project depends on Vite+ without expanding to an absolute local bin path.
|
|
151
|
-
*/
|
|
152
|
-
function formatProjectCommand(root, command) {
|
|
153
|
-
const [bin, ...args] = command.trim().split(/\s+/);
|
|
154
|
-
const formattedBin = resolveCommandBin(root, bin);
|
|
155
|
-
return args.length > 0 ? `${formattedBin} ${args.join(" ")}` : formattedBin;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Detect a static deploy preset based on the project root.
|
|
159
|
-
* Returns null when the project requires a full worker deploy.
|
|
160
|
-
*
|
|
161
|
-
* `strictBackend` refuses (throws) instead of returning an SSG preset when the
|
|
162
|
-
* project ALSO has backend sources. SSG detection (step 2) deliberately runs
|
|
163
|
-
* before the backend check (step 3), so without this an SSG repo that grew a
|
|
164
|
-
* single `routes/api/*.ts` would deploy as a pure static site with the backend
|
|
165
|
-
* silently dropped and no diagnostic. Opt-in because only the UNCONFIGURED
|
|
166
|
-
* auto-detect path is ambiguous: `--dir` and a configured
|
|
167
|
-
* `inference.appType: "static" | "spa"` are the user stating what they want, and
|
|
168
|
-
* must keep working silently.
|
|
169
|
-
*/
|
|
170
|
-
function detectPreset(root, options) {
|
|
171
|
-
if (options?.dir) return {
|
|
172
|
-
buildCommand: null,
|
|
173
|
-
outputDir: resolve(root, options.dir),
|
|
174
|
-
appType: options.spa ? "spa" : "static"
|
|
175
|
-
};
|
|
176
|
-
const pkg = readPackageJson(root);
|
|
177
|
-
if (pkg) {
|
|
178
|
-
const allDeps = getPackageDependencies(pkg);
|
|
179
|
-
for (const preset of Object.values(SSG_PRESETS)) if (preset.dep in allDeps) {
|
|
180
|
-
if (options?.strictBackend) {
|
|
181
|
-
const backendSources = findBackendSources(root);
|
|
182
|
-
if (backendSources.length > 0) throw new Error(ssgWithBackendMessage(preset.dep, backendSources));
|
|
183
|
-
}
|
|
184
|
-
const overrides = preset.resolve?.(root);
|
|
185
|
-
const cmd = overrides?.buildCommand ?? preset.buildCommand;
|
|
186
|
-
const out = overrides?.outputDir ?? preset.outputDir;
|
|
187
|
-
return {
|
|
188
|
-
buildCommand: resolveProjectCommand(root, cmd),
|
|
189
|
-
outputDir: resolve(root, out),
|
|
190
|
-
appType: preset.appType
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (hasBackendFiles(root)) return null;
|
|
195
|
-
if (pkg && hasViteLike(pkg)) return {
|
|
196
|
-
buildCommand: resolveProjectScriptCommand(root, "build") ?? resolveProjectCommand(root, "vite build"),
|
|
197
|
-
outputDir: resolve(root, "dist"),
|
|
198
|
-
appType: "spa"
|
|
199
|
-
};
|
|
200
|
-
if (existsSync(join(root, "dist/index.html"))) return {
|
|
201
|
-
buildCommand: null,
|
|
202
|
-
outputDir: resolve(root, "dist"),
|
|
203
|
-
appType: options?.spa ? "spa" : "static"
|
|
204
|
-
};
|
|
205
|
-
if (existsSync(join(root, "index.html"))) return {
|
|
206
|
-
buildCommand: null,
|
|
207
|
-
outputDir: root,
|
|
208
|
-
appType: options?.spa ? "spa" : "static"
|
|
209
|
-
};
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* The refusal shown when an SSG project also carries backend sources and no
|
|
214
|
-
* `inference.appType` says which one to deploy. Names the exact directories
|
|
215
|
-
* found and both ways out.
|
|
216
|
-
*/
|
|
217
|
-
function ssgWithBackendMessage(ssgDep, backendSources) {
|
|
218
|
-
return [
|
|
219
|
-
`deploy: "${ssgDep}" was detected, but this project also has backend code: ${backendSources.join(", ")}.`,
|
|
220
|
-
"A static deploy would silently drop it, so Void will not guess. Pick one in void.config.ts:",
|
|
221
|
-
"",
|
|
222
|
-
" Deploy the static output only (the backend is NOT deployed):",
|
|
223
|
-
" { \"inference\": { \"appType\": \"static\" } }",
|
|
224
|
-
"",
|
|
225
|
-
" Deploy both — the SSG emits the site, then Void packages it with the worker:",
|
|
226
|
-
" { \"inference\": { \"appType\": \"void\", \"build\": \"<ssg> build && vite build\" } }",
|
|
227
|
-
" ...and in vite.config.ts add voidPlugin() plus `publicDir: \"<ssg output dir>\"`,",
|
|
228
|
-
" so the generated site is copied into the client build alongside the worker."
|
|
229
|
-
].join("\n");
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Resolve a local node_modules/.bin executable path.
|
|
233
|
-
* Falls back to bare command name if the bin doesn't exist locally.
|
|
234
|
-
*/
|
|
235
|
-
function localBin(root, name) {
|
|
236
|
-
const bin = join(root, "node_modules", ".bin", name);
|
|
237
|
-
return existsSync(bin) ? bin : name;
|
|
238
|
-
}
|
|
239
|
-
function resolveCommandBin(root, name) {
|
|
240
|
-
if (name === "vite") return detectViteBinary(root);
|
|
241
|
-
return name;
|
|
242
|
-
}
|
|
243
|
-
function detectPackageManager(root) {
|
|
244
|
-
if (existsSync(join(root, "pnpm-lock.yaml"))) return "pnpm";
|
|
245
|
-
if (existsSync(join(root, "yarn.lock"))) return "yarn";
|
|
246
|
-
if (existsSync(join(root, "bun.lock")) || existsSync(join(root, "bun.lockb"))) return "bun";
|
|
247
|
-
return "npm";
|
|
248
|
-
}
|
|
249
|
-
function resolveProjectScriptCommand(root, scriptName) {
|
|
250
|
-
const script = readPackageJson(root)?.scripts;
|
|
251
|
-
if (!script || typeof script !== "object" || Array.isArray(script)) return null;
|
|
252
|
-
if (typeof script[scriptName] !== "string") return null;
|
|
253
|
-
switch (detectPackageManager(root)) {
|
|
254
|
-
case "pnpm": return `pnpm ${scriptName}`;
|
|
255
|
-
case "yarn": return `yarn ${scriptName}`;
|
|
256
|
-
case "bun": return `bun run ${scriptName}`;
|
|
257
|
-
default: return `npm run ${scriptName}`;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
function hasViteLike(pkg) {
|
|
261
|
-
return hasPackageDependency(pkg, "vite") || hasPackageDependency(pkg, "vite-plus");
|
|
262
|
-
}
|
|
263
|
-
function detectViteBinary(root) {
|
|
264
|
-
const pkg = readPackageJson(root);
|
|
265
|
-
if (pkg && hasPackageDependency(pkg, "vite-plus")) return "vp";
|
|
266
|
-
return "vite";
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Every backend source in the project that requires a full worker deploy, named
|
|
270
|
-
* relative to the root (e.g. `routes/`, `src/main.ssr.tsx`).
|
|
271
|
-
*
|
|
272
|
-
* Returned as a list rather than a boolean so a caller that has to REJECT a
|
|
273
|
-
* static deploy can tell the user exactly what would have been dropped.
|
|
274
|
-
*/
|
|
275
|
-
function findBackendSources(root) {
|
|
276
|
-
const paths = readProjectPaths(root);
|
|
277
|
-
const found = [];
|
|
278
|
-
for (const dir of backendDirs(paths)) if (existsSync(dir)) found.push(`${relative(root, dir)}/`);
|
|
279
|
-
const ssrEntry = getSsrServerEntryPath(root, paths);
|
|
280
|
-
if (ssrEntry) found.push(relative(root, ssrEntry));
|
|
281
|
-
return found;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Check whether the project has backend files that require a full worker deploy.
|
|
285
|
-
*/
|
|
286
|
-
function hasBackendFiles(root) {
|
|
287
|
-
const paths = readProjectPaths(root);
|
|
288
|
-
return backendDirs(paths).some((dir) => existsSync(dir)) || hasSsrEntry(root, paths);
|
|
289
|
-
}
|
|
290
|
-
function backendDirs(paths) {
|
|
291
|
-
return [
|
|
292
|
-
paths.routesDir,
|
|
293
|
-
paths.pagesDir,
|
|
294
|
-
paths.middlewareDir,
|
|
295
|
-
paths.cronsDir,
|
|
296
|
-
paths.queuesDir,
|
|
297
|
-
paths.emailDir
|
|
298
|
-
];
|
|
299
|
-
}
|
|
300
|
-
// src/cli/cloudflare-process.ts
|
|
301
|
-
/** Operations contain public targets only. Secret values travel through stdin. */
|
|
302
|
-
function encodeCloudflareOperation(operation) {
|
|
303
|
-
return [JSON.stringify(operation)];
|
|
304
|
-
}
|
|
305
|
-
/** True only for a child that ran to completion with a clean exit 0. */
|
|
306
|
-
function isCleanCloudflareExit(result) {
|
|
307
|
-
return result.status === 0 && result.signal == null && (result.error == null || result.error === "");
|
|
308
|
-
}
|
|
309
|
-
/** Decode the private process envelope once, retaining cancellation provenance. */
|
|
310
|
-
function decodeCloudflareOperationResult(result) {
|
|
311
|
-
if (result.signal || result.error || result.status === null) return result;
|
|
312
|
-
if (!result.stdout.trim() && result.status !== 0) return result;
|
|
313
|
-
try {
|
|
314
|
-
const value = JSON.parse(result.stdout);
|
|
315
|
-
if (!value || typeof value !== "object" || Array.isArray(value) || !("operationResult" in value) || value.operationResult !== 1) throw new Error("Invalid operation envelope.");
|
|
316
|
-
const envelope = value;
|
|
317
|
-
if (envelope.output !== void 0 && typeof envelope.output !== "string" || envelope.signal != null && typeof envelope.signal !== "string" || envelope.error != null && typeof envelope.error !== "string" || envelope.errorCode !== void 0 && !Number.isSafeInteger(envelope.errorCode) || envelope.failure !== void 0 && ![
|
|
318
|
-
"not-found",
|
|
319
|
-
"durable-migration",
|
|
320
|
-
"containers-unavailable"
|
|
321
|
-
].includes(envelope.failure) || envelope.errors !== void 0 && (!Array.isArray(envelope.errors) || envelope.errors.some((error) => !error || typeof error !== "object" || typeof error.message !== "string" || error.code !== void 0 && !Number.isSafeInteger(error.code)))) throw new Error("Invalid operation envelope fields.");
|
|
322
|
-
if (envelope.signal || envelope.error) return {
|
|
323
|
-
...result,
|
|
324
|
-
status: 1,
|
|
325
|
-
stdout: "",
|
|
326
|
-
signal: envelope.signal,
|
|
327
|
-
error: envelope.error
|
|
328
|
-
};
|
|
329
|
-
return {
|
|
330
|
-
...result,
|
|
331
|
-
stdout: envelope.output ?? "",
|
|
332
|
-
data: envelope.data,
|
|
333
|
-
errorCode: envelope.errorCode,
|
|
334
|
-
errors: envelope.errors,
|
|
335
|
-
failure: envelope.failure
|
|
336
|
-
};
|
|
337
|
-
} catch {
|
|
338
|
-
return {
|
|
339
|
-
...result,
|
|
340
|
-
status: 1,
|
|
341
|
-
stdout: "",
|
|
342
|
-
stderr: [result.stderr, "Cloudflare tooling returned an invalid operation response."].filter(Boolean).join("\n")
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
/** Echo a decoded result to the terminal when the caller did not capture it. */
|
|
347
|
-
function writeUncapturedOperationOutput(result) {
|
|
348
|
-
if (result.stdout) process.stdout.write(result.stdout);
|
|
349
|
-
if (result.stderr) process.stderr.write(result.stderr);
|
|
350
|
-
}
|
|
351
|
-
function createCloudflareProcessRunner(options) {
|
|
352
|
-
const [command, ...prefix] = resolveCloudflareOperationArgv();
|
|
353
|
-
return (operation, run) => {
|
|
354
|
-
const streaming = !run.capture && (operation.type === "auth.login" || operation.type === "tail");
|
|
355
|
-
const env = typeof options.env === "function" ? options.env() : options.env ?? process.env;
|
|
356
|
-
const result = spawnSync(command, [...prefix, ...encodeCloudflareOperation(operation)], {
|
|
357
|
-
cwd: run.cwd ?? options.root,
|
|
358
|
-
env: {
|
|
359
|
-
...env,
|
|
360
|
-
...options.accountId ? { CLOUDFLARE_ACCOUNT_ID: options.accountId } : {},
|
|
361
|
-
...options.apiBaseUrl ? { CLOUDFLARE_API_BASE_URL: options.apiBaseUrl } : {}
|
|
362
|
-
},
|
|
363
|
-
input: run.input,
|
|
364
|
-
encoding: "utf8",
|
|
365
|
-
shell: false,
|
|
366
|
-
windowsHide: true,
|
|
367
|
-
maxBuffer: operation.type === "versions.view" && operation.includeSource ? CF_VERSION_SOURCE_MAX_OUTPUT_BYTES : 33554432,
|
|
368
|
-
timeout: options.timeoutMs,
|
|
369
|
-
stdio: streaming ? [
|
|
370
|
-
"inherit",
|
|
371
|
-
"inherit",
|
|
372
|
-
"inherit"
|
|
373
|
-
] : [
|
|
374
|
-
"pipe",
|
|
375
|
-
"pipe",
|
|
376
|
-
"pipe"
|
|
377
|
-
]
|
|
378
|
-
});
|
|
379
|
-
const raw = {
|
|
380
|
-
status: result.status ?? 1,
|
|
381
|
-
stdout: result.stdout ?? "",
|
|
382
|
-
stderr: result.stderr ?? "",
|
|
383
|
-
signal: result.signal,
|
|
384
|
-
error: result.error?.message
|
|
385
|
-
};
|
|
386
|
-
if (streaming) return raw;
|
|
387
|
-
const decoded = decodeCloudflareOperationResult(raw);
|
|
388
|
-
if (!run.capture) writeUncapturedOperationOutput(decoded);
|
|
389
|
-
return decoded;
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
export { FRAMEWORK_PRESETS as a, hasBackendFiles as c, isCleanCloudflareExit as i, resolveCloudflareOperationArgv as l, decodeCloudflareOperationResult as n, detectPreset as o, encodeCloudflareOperation as r, formatProjectCommand as s, createCloudflareProcessRunner as t, resolveProjectCommand as u };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// src/cli/cloudflare-user-output.ts
|
|
2
|
-
/**
|
|
3
|
-
* Keep Void's public CLI vocabulary at the product level while preserving real
|
|
4
|
-
* Cloudflare config filenames and environment variables that users may need to
|
|
5
|
-
* inspect. The underlying implementation remains available in source and deploy
|
|
6
|
-
* diagnostics, but normal remediation always points back to Void commands.
|
|
7
|
-
*/
|
|
8
|
-
function formatCloudflareUserMessage(message) {
|
|
9
|
-
const preserved = [];
|
|
10
|
-
const protect = (value) => {
|
|
11
|
-
return `\uE000VOID_CF_TERM_${preserved.push(value) - 1}\uE001`;
|
|
12
|
-
};
|
|
13
|
-
let result = message.replace(/(?:[A-Za-z]:)?[^\s`"']*wrangler\.jsonc?/gi, protect).replace(/\bWRANGLER_[A-Z0-9_]+\b/g, protect).replace(/\.wrangler\b/gi, protect).replace(/`wrangler deploy`/gi, "`void deploy --platform cloudflare`").replace(/`wrangler secret list[^`]*`/gi, "`void secret list`").replace(/`wrangler secret put\s+([^`]*)`/gi, "`void secret put $1`").replace(/`wrangler d1 migrations apply[^`]*`/gi, "`void db migrate --remote`").replace(/`wrangler d1 migrations list[^`]*`/gi, "`void db status`").replace(/`wrangler[^`]*`/gi, "the underlying Cloudflare operation").replace(/"wrangler[^"\n]*"/gi, "\"Cloudflare operation\"").replace(/\bwrangler uploader\b/gi, "Cloudflare deployment tool").replace(/\bwrangler (?:CLI|binary|process|child)\b/gi, "Cloudflare deployment tool").replace(/\bwrangler config\b/gi, "Cloudflare config").replace(/\bwrangler\b/gi, "Cloudflare tooling");
|
|
14
|
-
result = result.replace(/\uE000VOID_CF_TERM_(\d+)\uE001/g, (_match, index) => {
|
|
15
|
-
return preserved[Number(index)] ?? "";
|
|
16
|
-
});
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
|
-
export { formatCloudflareUserMessage as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as collectMigrations } from "./collect-C6Blu9yw.mjs";
|
package/dist/deploy-DiFfBu8g.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as discoverSchema } from "./discover-Vd18lHsj.mjs";
|
package/dist/gen-CuANrEzy.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { r as runGenCommand } from "./gen-EMpnzNGz.mjs";
|
package/dist/help-7EzLA1qP.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { r as printHelpPage } from "./help-DCQKp3Kp.mjs";
|
package/dist/login-apwve7WD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { r as selectPlatformLoginMethod } from "./login-p1_BMgXg.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as runMigrateCommand } from "./migrate-9dlt6Mxu.mjs";
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { n as splitMigrationSql } from "./d1-handler-C1LH2K2s.mjs";
|
|
2
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
-
// src/runtime/db/migrations/mysql-lock.ts
|
|
4
|
-
/**
|
|
5
|
-
* Migration runs on one MySQL database exclude each other with two kinds of lock, and each run
|
|
6
|
-
* checks for the other kind after it takes its own:
|
|
7
|
-
*
|
|
8
|
-
* - The CLI runner holds a named lock (GET_LOCK) for its session, so it ends with the connection.
|
|
9
|
-
* - The hosted handler reaches MySQL through Hyperdrive, which pools connections per transaction,
|
|
10
|
-
* so a session lock could stay on a pooled connection or be reset away. It writes a lease row
|
|
11
|
-
* with an expiry instead, using one statement at a time. Lease times are UTC: NOW() follows
|
|
12
|
-
* each session's time zone and its DST changes, and DATETIME stores no zone.
|
|
13
|
-
*/
|
|
14
|
-
/** Hyperdrive ends a statement after 60 seconds, and the hosted handler renews before each one. */
|
|
15
|
-
const LEASE_SECONDS = 120;
|
|
16
|
-
/** A deploy waits long enough for the lease of a run that stopped early to expire. */
|
|
17
|
-
const DEPLOY_WAIT_MS = 13e4;
|
|
18
|
-
const POLL_MS = 1e3;
|
|
19
|
-
/** How often the lease is renewed while statements that cannot renew it themselves run. */
|
|
20
|
-
const KEEP_ALIVE_MS = 3e4;
|
|
21
|
-
/**
|
|
22
|
-
* The CLI runner's named lock. Lock names are server-wide and at most 64 characters, so the name
|
|
23
|
-
* carries a hash of the database name. Vitess reports a connection's target (`app@primary`,
|
|
24
|
-
* `app:-80@replica`) in DATABASE(), and the lock belongs to the keyspace.
|
|
25
|
-
*/
|
|
26
|
-
function mySqlMigrationLockName(database) {
|
|
27
|
-
return `void_migrations:${createHash("sha1").update(database.split(/[:@]/)[0]).digest("hex")}`;
|
|
28
|
-
}
|
|
29
|
-
function mySqlMigrationLockError(database, retry) {
|
|
30
|
-
return /* @__PURE__ */ new Error(`Another migration run is applying migrations to MySQL database "${database}". Wait for it to finish, then ${retry}.`);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Seconds left on a deploy's lease, or undefined when no deploy holds one. The CLI runner calls
|
|
34
|
-
* this while it holds the named lock.
|
|
35
|
-
*/
|
|
36
|
-
async function readMySqlMigrationLease(query) {
|
|
37
|
-
try {
|
|
38
|
-
const [row] = rowsOf(await query("SELECT TIMESTAMPDIFF(SECOND, UTC_TIMESTAMP(6), `expires_at`) AS remaining FROM `_void_migration_lock` WHERE `name` = 'app' AND `expires_at` > UTC_TIMESTAMP(6)"));
|
|
39
|
-
return row ? Number(row.remaining) : void 0;
|
|
40
|
-
} catch (error) {
|
|
41
|
-
if (isMissingTable(error)) return;
|
|
42
|
-
throw error;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Takes the lease for a hosted run. It waits while another deploy holds the lease or a CLI run
|
|
47
|
-
* holds the named lock, and throws when that takes too long.
|
|
48
|
-
*/
|
|
49
|
-
async function acquireMySqlMigrationLease(query) {
|
|
50
|
-
const [row] = rowsOf(await query("SELECT DATABASE() AS db"));
|
|
51
|
-
const database = String(row?.db ?? "");
|
|
52
|
-
const lockName = mySqlMigrationLockName(database);
|
|
53
|
-
const owner = randomUUID();
|
|
54
|
-
await query("CREATE TABLE IF NOT EXISTS `_void_migration_lock` (`name` VARCHAR(64) NOT NULL PRIMARY KEY, `owner` VARCHAR(64) NOT NULL, `expires_at` DATETIME(6) NOT NULL)");
|
|
55
|
-
const lease = {
|
|
56
|
-
async renew() {
|
|
57
|
-
if (affectedRows(await query("UPDATE `_void_migration_lock` SET `expires_at` = UTC_TIMESTAMP(6) + INTERVAL ? SECOND WHERE `name` = 'app' AND `owner` = ? AND `expires_at` > UTC_TIMESTAMP(6)", [LEASE_SECONDS, owner])) !== 1) throw new Error(`The migration lock on MySQL database "${database}" expired before this run finished. Deploy again.`);
|
|
58
|
-
},
|
|
59
|
-
async release() {
|
|
60
|
-
await query("UPDATE `_void_migration_lock` SET `expires_at` = UTC_TIMESTAMP(6) - INTERVAL 1 SECOND WHERE `name` = 'app' AND `owner` = ?", [owner]);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const deadline = Date.now() + DEPLOY_WAIT_MS;
|
|
64
|
-
for (;;) {
|
|
65
|
-
if (await take(query, owner)) {
|
|
66
|
-
const [lock] = rowsOf(await query("SELECT IS_USED_LOCK(?)", [lockName]));
|
|
67
|
-
if (Object.values(lock ?? {})[0] == null) return lease;
|
|
68
|
-
await lease.release();
|
|
69
|
-
}
|
|
70
|
-
if (Date.now() >= deadline) throw mySqlMigrationLockError(database, "deploy again");
|
|
71
|
-
await new Promise((resolve) => setTimeout(resolve, POLL_MS));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Runs `work`, whose statements cannot renew the lease before each one (Better Auth's migrations),
|
|
76
|
-
* and renews the lease in the background meanwhile. Throws after `work` when a renewal failed,
|
|
77
|
-
* because another run may have taken the lease.
|
|
78
|
-
*/
|
|
79
|
-
async function holdMySqlMigrationLease(lease, work) {
|
|
80
|
-
await lease.renew();
|
|
81
|
-
let failure;
|
|
82
|
-
let renewal = Promise.resolve();
|
|
83
|
-
const timer = setInterval(() => {
|
|
84
|
-
renewal = renewal.then(() => lease.renew()).catch((error) => {
|
|
85
|
-
failure ??= { error };
|
|
86
|
-
});
|
|
87
|
-
}, KEEP_ALIVE_MS);
|
|
88
|
-
let result;
|
|
89
|
-
try {
|
|
90
|
-
result = await work();
|
|
91
|
-
} finally {
|
|
92
|
-
clearInterval(timer);
|
|
93
|
-
await renewal;
|
|
94
|
-
}
|
|
95
|
-
if (failure) throw failure.error;
|
|
96
|
-
return result;
|
|
97
|
-
}
|
|
98
|
-
async function take(query, owner) {
|
|
99
|
-
try {
|
|
100
|
-
return await tryTake(query, owner);
|
|
101
|
-
} catch (error) {
|
|
102
|
-
if (errnoOf(error) === 1213) return false;
|
|
103
|
-
throw error;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
async function tryTake(query, owner) {
|
|
107
|
-
if (affectedRows(await query("INSERT IGNORE INTO `_void_migration_lock` (`name`, `owner`, `expires_at`) VALUES ('app', ?, UTC_TIMESTAMP(6) + INTERVAL ? SECOND)", [owner, LEASE_SECONDS])) === 1) return true;
|
|
108
|
-
return affectedRows(await query("UPDATE `_void_migration_lock` SET `owner` = ?, `expires_at` = UTC_TIMESTAMP(6) + INTERVAL ? SECOND WHERE `name` = 'app' AND `expires_at` < UTC_TIMESTAMP(6)", [owner, LEASE_SECONDS])) === 1;
|
|
109
|
-
}
|
|
110
|
-
function rowsOf(result) {
|
|
111
|
-
return Array.isArray(result) ? result : [];
|
|
112
|
-
}
|
|
113
|
-
function affectedRows(result) {
|
|
114
|
-
return Number(result?.affectedRows ?? 0);
|
|
115
|
-
}
|
|
116
|
-
function isMissingTable(error) {
|
|
117
|
-
const value = typeof error === "object" && error !== null ? error : void 0;
|
|
118
|
-
return value?.code === "ER_NO_SUCH_TABLE" || value?.errno === 1146;
|
|
119
|
-
}
|
|
120
|
-
function errnoOf(error) {
|
|
121
|
-
return typeof error === "object" && error !== null ? error.errno : void 0;
|
|
122
|
-
}
|
|
123
|
-
// src/runtime/db/migrations/mysql-sql.ts
|
|
124
|
-
/**
|
|
125
|
-
* Splits a MySQL migration file into the statements Void runs one query at a time. Hyperdrive
|
|
126
|
-
* does not accept several statements in one query, and a file that runs statement by statement
|
|
127
|
-
* can tell whether a failure left earlier statements committed.
|
|
128
|
-
*
|
|
129
|
-
* The file first splits at drizzle-kit `--> statement-breakpoint` lines. Each part then splits at
|
|
130
|
-
* semicolons outside strings, quoted names and comments, and drops comments after its last
|
|
131
|
-
* statement. A statement that defines a trigger, routine or event keeps the rest of its part with
|
|
132
|
-
* it: the semicolons in its BEGIN ... END body cannot be told apart from the ones between
|
|
133
|
-
* statements without a parser.
|
|
134
|
-
*/
|
|
135
|
-
function splitMySqlMigrationSql(sql) {
|
|
136
|
-
return splitMySqlMigrationStatements(sql).map((statement) => statement.sql);
|
|
137
|
-
}
|
|
138
|
-
/** {@link splitMySqlMigrationSql}, with each statement marked. */
|
|
139
|
-
function splitMySqlMigrationStatements(sql) {
|
|
140
|
-
return splitMigrationSql(sql).flatMap((part) => {
|
|
141
|
-
const statements = splitMySqlStatements(part);
|
|
142
|
-
return statements.length > 0 ? statements : [{
|
|
143
|
-
sql: part,
|
|
144
|
-
program: false
|
|
145
|
-
}];
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* The start of a statement whose body can hold semicolons: a stored program, after options such
|
|
150
|
-
* as DEFINER, or a compound statement that MariaDB also runs outside one. It is matched against
|
|
151
|
-
* the statement with quoted text and comments blanked out, so a column named `event` or a plain
|
|
152
|
-
* `BEGIN` transaction does not match.
|
|
153
|
-
*/
|
|
154
|
-
const COMPOUND_START = new RegExp([
|
|
155
|
-
`^\\s*(?:CREATE|ALTER)\\s+(?:(?!(?:TABLE|INDEX|VIEW|DATABASE|SCHEMA|USER|ROLE|TABLESPACE|SERVER|UNIQUE|FULLTEXT|SPATIAL|TEMPORARY)\\b)\\S+\\s+){0,8}?(?:TRIGGER|PROCEDURE|FUNCTION|EVENT|PACKAGE)\\b`,
|
|
156
|
-
"^\\s*BEGIN\\s+NOT\\s+ATOMIC\\b",
|
|
157
|
-
"^\\s*(?:\\w+\\s*:\\s*)?(?:BEGIN|IF|CASE|LOOP|REPEAT|WHILE)\\b(?!\\s*(?:WORK\\s*)?$)"
|
|
158
|
-
].join("|"), "i");
|
|
159
|
-
/** The statements in `sql`, without the comments around them. */
|
|
160
|
-
function splitMySqlStatements(sql) {
|
|
161
|
-
const statements = [];
|
|
162
|
-
let bare = "";
|
|
163
|
-
let start = -1;
|
|
164
|
-
let end = -1;
|
|
165
|
-
let compound = false;
|
|
166
|
-
let index = 0;
|
|
167
|
-
const take = (from, to) => {
|
|
168
|
-
if (start === -1) start = from;
|
|
169
|
-
end = to;
|
|
170
|
-
};
|
|
171
|
-
while (index < sql.length) {
|
|
172
|
-
const character = sql[index];
|
|
173
|
-
const next = sql[index + 1];
|
|
174
|
-
if (character === "'" || character === "\"" || character === "`") {
|
|
175
|
-
const close = skipQuoted(sql, index, character);
|
|
176
|
-
take(index, close);
|
|
177
|
-
bare += " ";
|
|
178
|
-
index = close;
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
if (character === "#" || character === "-" && next === "-" && !/\S/.test(sql[index + 2] ?? " ")) {
|
|
182
|
-
const newline = sql.indexOf("\n", index);
|
|
183
|
-
index = newline === -1 ? sql.length : newline;
|
|
184
|
-
bare += " ";
|
|
185
|
-
continue;
|
|
186
|
-
}
|
|
187
|
-
if (character === "/" && next === "*") {
|
|
188
|
-
const close = sql.indexOf("*/", index + 2);
|
|
189
|
-
const commentEnd = close === -1 ? sql.length : close + 2;
|
|
190
|
-
if (sql[index + 2] === "!" || sql[index + 2] === "+") take(index, commentEnd);
|
|
191
|
-
bare += " ";
|
|
192
|
-
index = commentEnd;
|
|
193
|
-
continue;
|
|
194
|
-
}
|
|
195
|
-
if (character === ";" && !compound) {
|
|
196
|
-
if (start !== -1 && COMPOUND_START.test(bare)) compound = true;
|
|
197
|
-
else {
|
|
198
|
-
if (start !== -1) statements.push({
|
|
199
|
-
sql: sql.slice(start, index + 1),
|
|
200
|
-
program: false
|
|
201
|
-
});
|
|
202
|
-
start = -1;
|
|
203
|
-
end = -1;
|
|
204
|
-
bare = "";
|
|
205
|
-
index++;
|
|
206
|
-
continue;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
bare += character;
|
|
210
|
-
if (!/\s/.test(character)) take(index, index + 1);
|
|
211
|
-
index++;
|
|
212
|
-
}
|
|
213
|
-
if (start !== -1) statements.push({
|
|
214
|
-
sql: sql.slice(start, end),
|
|
215
|
-
program: compound
|
|
216
|
-
});
|
|
217
|
-
return statements;
|
|
218
|
-
}
|
|
219
|
-
/** The index after the quoted string or name that opens at `open`. */
|
|
220
|
-
function skipQuoted(sql, open, quote) {
|
|
221
|
-
let index = open + 1;
|
|
222
|
-
while (index < sql.length) {
|
|
223
|
-
const character = sql[index];
|
|
224
|
-
if (character === "\\" && quote !== "`") {
|
|
225
|
-
index += 2;
|
|
226
|
-
continue;
|
|
227
|
-
}
|
|
228
|
-
if (character === quote) {
|
|
229
|
-
if (sql[index + 1] === quote) {
|
|
230
|
-
index += 2;
|
|
231
|
-
continue;
|
|
232
|
-
}
|
|
233
|
-
return index + 1;
|
|
234
|
-
}
|
|
235
|
-
index++;
|
|
236
|
-
}
|
|
237
|
-
return sql.length;
|
|
238
|
-
}
|
|
239
|
-
export { mySqlMigrationLockError as a, holdMySqlMigrationLease as i, splitMySqlMigrationStatements as n, mySqlMigrationLockName as o, acquireMySqlMigrationLease as r, readMySqlMigrationLease as s, splitMySqlMigrationSql as t };
|