void 0.25.0 → 0.26.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/AGENTS_TEMPLATE.md +1 -3
- package/README.md +19 -9
- package/dist/{account-cmd-DcR1ywt8.mjs → account-cmd-CfUXh_nU.mjs} +8 -7
- package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DKy02UY0.mjs} +21 -32
- package/dist/{application-routing-B7QEjqSR.mjs → application-routing-DQyUh_5S.mjs} +1 -1
- package/dist/{auth-7wuZ5ob8.mjs → auth-B5_tZLxT.mjs} +9 -9
- package/dist/{auth-CdgZ9uag.mjs → auth-BgX2qYSY.mjs} +1 -1
- package/dist/{auth-link-Z6E5DYvM.mjs → auth-link-D5RmKnzh.mjs} +5 -5
- package/dist/{auth-migrations-9vif1uj8.mjs → auth-migrations-BwHgeEsD.mjs} +8 -18
- package/dist/{auth-router-BdM4avI8.mjs → auth-router-Bap-pvbn.mjs} +6 -19
- package/dist/{better-auth-shared-BVkjZ3vM.d.mts → better-auth-shared-CPvWD3nG.d.mts} +0 -4
- package/dist/{better-auth-shared-hy6RPh9W.mjs → better-auth-shared-DPpj8zxc.mjs} +94 -16
- package/dist/{build-cmd-CEE7D-hM.mjs → build-cmd-B58c8iS8.mjs} +8 -7
- package/dist/{cache-TcZnBLtH.mjs → cache-Bo52trKF.mjs} +8 -8
- package/dist/{cancel-deploy-CYoZmcmR.mjs → cancel-deploy-BZNz3Q26.mjs} +6 -5
- package/dist/{cf-access-AHKBzmuu.mjs → cf-access-ngGqZpHZ.mjs} +11 -12
- package/dist/{cf-build-output-U8o1Gl6X.mjs → cf-build-output-DjvB_872.mjs} +62 -85
- package/dist/cf-build-output-H9a97vME.mjs +2 -0
- package/dist/cli/cli.mjs +48 -83
- package/dist/cli/cloudflare-operation-process.mjs +71 -77
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +5 -6
- package/dist/client-By4JjMw_.mjs +2 -0
- package/dist/{client-RsPo8wsP.mjs → client-C2Prx_Bi.mjs} +30 -8
- package/dist/{cloudflare-auth-Qdc7tw8F.mjs → cloudflare-auth-CuxfF6OA.mjs} +9 -17
- package/dist/{cloudflare-cmd-bhwCxAN6.mjs → cloudflare-cmd-lHqNlJGW.mjs} +6 -5
- package/dist/{cloudflare-config-Bktvwtpf.mjs → cloudflare-config-BmhBv3HV.mjs} +1 -1
- package/dist/{cloudflare-connect-CuhRgk3k.mjs → cloudflare-connect-2G3rL2rP.mjs} +4 -4
- package/dist/{cloudflare-operations-BhbK6yTq.mjs → cloudflare-operations-BlYLlowZ.mjs} +1 -1
- package/dist/{cloudflare-operations-CjaV4lZi.mjs → cloudflare-operations-CwI1bChl.mjs} +41 -70
- package/dist/{cloudflare-process-B-wekeR6.mjs → cloudflare-process-2-TfIEzB.mjs} +20 -22
- package/dist/{config-CyQ-wVd7.mjs → config-5r-YpMC-.mjs} +1 -1
- package/dist/{config-C_XRIPx2.mjs → config-B_ggY-IO.mjs} +3 -3
- package/dist/config-BtSFvXZx.mjs +2 -0
- package/dist/config-CLYAosnQ.mjs +78 -0
- package/dist/{config-BMHb8RCj.d.mts → config-CSa15FvD.d.mts} +1 -1
- package/dist/{config-Br_JZD6u.mjs → config-DiowPT80.mjs} +24 -30
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-B1f88wJA.mjs → config-write-AHGesphx.mjs} +8 -7
- package/dist/{connect-DCvUmPXY.mjs → connect-X0MUA1gk.mjs} +12 -11
- package/dist/{create-project-eAPgYq35.mjs → create-project-DxiyW6iX.mjs} +7 -7
- package/dist/{create-project-C734I-Mu.mjs → create-project-iwkbqiBU.mjs} +1 -1
- package/dist/{db-C07GEdKF.mjs → db-XnVMHzoV.mjs} +101 -133
- package/dist/{delete-pKMVsrpJ.mjs → delete-esYlMiSJ.mjs} +8 -8
- package/dist/{deploy-DfsAe-T0.mjs → deploy-BsEvnlJl.mjs} +2377 -2512
- package/dist/deploy-C1d-YTfp.mjs +2 -0
- package/dist/{dev-inbox-D64ZKUod.mjs → dev-inbox-CK-UuPob.mjs} +7 -16
- package/dist/{discover-BcPPiF1o.mjs → discover-CkCYv9T_.mjs} +1 -2
- package/dist/discover-EDUf6JJw.mjs +2 -0
- package/dist/{prompts-ZAuJlyCj.mjs → dist-Bx1z6Eva.mjs} +1 -1
- package/dist/{dist-AoCzRTJE.mjs → dist-Cegxq8gs.mjs} +8 -8
- package/dist/{prompts-6OSVA7DJ.mjs → dist-D3m88sjf.mjs} +10 -53
- package/dist/{domain-D3uA9ize.mjs → domain-CbbBWhWE.mjs} +29 -30
- package/dist/{dotenv-VQxupEUv.mjs → dotenv-BfU6eqFt.mjs} +20 -32
- package/dist/{drizzle-Beb2Am5S.mjs → drizzle-CF84FOVM.mjs} +16 -13
- package/dist/{email-z3o2cwjH.mjs → email-CpuT42g7.mjs} +24 -19
- package/dist/{email--tEtMoj_.mjs → email-d_Aux1vM.mjs} +1 -1
- package/dist/{entry-CF5wvH4w.mjs → entry-CMAkqBmU.mjs} +6 -6
- package/dist/{env-_v349JBd.mjs → env-BxocywBB.mjs} +25 -6
- package/dist/{env-D5liuQYR.mjs → env-DMA3cXZt.mjs} +1 -1
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{env-raw-Cx8ElDdj.mjs → env-raw-jZpP5n47.mjs} +1 -2
- package/dist/{env-types-D5kds_OZ.mjs → env-types-CwXgeMgL.mjs} +1 -1
- package/dist/{env-validation-cZBvGWaP.mjs → env-validation-CrVNjsPm.mjs} +1 -1
- package/dist/{env-validation-vBSQ8gw5.mjs → env-validation-Dxdx_5wo.mjs} +17 -21
- package/dist/{env-3Q8-_2IH.mjs → env-w9jOyGZn.mjs} +10 -9
- package/dist/{fetch-_SeGZao9.d.mts → fetch-BPCYVi3H.d.mts} +20 -1
- package/dist/{fetch-BIZJh7vR.mjs → fetch-sAcwjzLO.mjs} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-PGgz4uGz.mjs} +26 -24
- package/dist/{fetch-stream-Bjf0hoZb.d.mts → fetch-stream-obvZ7fvO.d.mts} +1 -16
- package/dist/{gen-NjwoG9FK.mjs → gen-DtkQhvQg.mjs} +40 -57
- package/dist/gen-dA9hW7AV.mjs +2 -0
- package/dist/{github-cmd-DquUq-b1.mjs → github-cmd-D_FsOFxq.mjs} +65 -164
- package/dist/{handler-DghKr6dU.mjs → handler-BHAn2fZJ.mjs} +1 -0
- package/dist/{handler-CZ4nAylQ.d.mts → handler-CNAwjRcW.d.mts} +5 -12
- package/dist/{head-Do8P4puT.d.mts → head-C8K_iGe6.d.mts} +1 -1
- package/dist/{head-D_QRR5Yd.mjs → head-D2VF4ApL.mjs} +29 -51
- package/dist/{headers-2rKda9Y6.mjs → headers-DlfR78Nu.mjs} +3 -3
- package/dist/{help-DRZXC4fj.mjs → help-CVFBTmBx.mjs} +23 -38
- package/dist/help-DzKUrQvk.mjs +2 -0
- package/dist/{inbound-fRkqcXaC.mjs → inbound-PfQDLXc5.mjs} +23 -24
- package/dist/index.d.mts +19 -2
- package/dist/index.mjs +632 -532
- package/dist/{info-BmA3_IFZ.mjs → info-PYWwkWyt.mjs} +4 -4
- package/dist/{init-DT7yuuyl.mjs → init-Bw-fRKGp.mjs} +161 -197
- package/dist/{limits-Bq5LG8Id.d.mts → limits-CFsDKQvU.d.mts} +1 -10
- package/dist/{limits-Cjuk2VPm.mjs → limits-D0vD1M9A.mjs} +1 -22
- package/dist/{link-CXOlqh2F.mjs → link-DlPG8iX3.mjs} +10 -10
- package/dist/{list-eEWVJEPn.mjs → list-2GN7_ueV.mjs} +11 -9
- package/dist/{live-CB1y5IuC.mjs → live-CgQuTpqD.mjs} +15 -16
- package/dist/{live-Chw1eIMv.d.mts → live-Du8jXwOW.d.mts} +4 -2
- package/dist/{local-d1-Df4XpwhW.mjs → local-d1-ga5O_idV.mjs} +2 -2
- package/dist/{login-pWQHYVu2.mjs → login-D-Q4xw3Q.mjs} +7 -7
- package/dist/login-Dc-wuTDq.mjs +2 -0
- package/dist/{logs-DnxVX7TR.mjs → logs-rd8J-OFh.mjs} +28 -11
- package/dist/migrate-BHp07yJE.mjs +2 -0
- package/dist/{migrate-CV1on-yJ.mjs → migrate-NLsjBbuM.mjs} +34 -20
- package/dist/{mime-D5Nmdzf7.mjs → mime-DxCznlJq.mjs} +45 -95
- package/dist/{node-BkyRWRx8.mjs → node-DJicPvPj.mjs} +5 -5
- package/dist/{operator-args-CAVcmwUt.mjs → operator-args-BNsW5gfp.mjs} +10 -1
- package/dist/{operator-auth-CkmTE3rt.mjs → operator-auth-AzVLbrr3.mjs} +4 -8
- package/dist/{operator-client-LmwjxT6q.mjs → operator-client-BQtzyG-g.mjs} +3 -3
- package/dist/{operator-cmd-d-IEKgNk.mjs → operator-cmd-B6f6Cg9Z.mjs} +45 -14
- package/dist/operator-cmd-Cwn50lOV.mjs +2 -0
- package/dist/{output-BBsUwdyT.mjs → output-C50ag2r3.mjs} +44 -2
- package/dist/pages/client.d.mts +19 -51
- package/dist/pages/client.mjs +204 -225
- package/dist/pages/head-client.d.mts +1 -1
- 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 +6 -12
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +21 -25
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/{plan-NPpwZ_kc.mjs → plan-BhLO2p4w.mjs} +4 -3
- package/dist/plan-CH2G51je.mjs +2 -0
- package/dist/{platform-args-Bzf8JPc2.mjs → platform-args-BoZkWQnJ.mjs} +4 -2
- package/dist/platform-args-DYgITk0D.mjs +2 -0
- package/dist/{platform-auth-config-0V0lA3pF.mjs → platform-auth-config-n603OANg.mjs} +45 -40
- package/dist/{platform-auth-protection-DFeJ-JkK.mjs → platform-auth-protection-zxDr0hWW.mjs} +9 -8
- package/dist/{platform-auth-recovery-ICy4muq6.mjs → platform-auth-recovery-tw9lgtgE.mjs} +8 -7
- package/dist/{platform-cmd-D7vSWMvV.mjs → platform-cmd-B8-bCb7t.mjs} +48 -23
- package/dist/{platform-cmd-BPySFOew.mjs → platform-cmd-C00YM14r.mjs} +1 -1
- package/dist/{platform-discovery-DDDUvnqp.mjs → platform-discovery-BC0HCKYt.mjs} +18 -4
- package/dist/{platform-domain-CUdY064e.mjs → platform-domain-p0kobLV8.mjs} +6 -5
- package/dist/{platform-lifecycle-Dm09JNkn.mjs → platform-lifecycle-D_QEY32D.mjs} +906 -389
- package/dist/{platform-lifecycle-BaUdTRPU.mjs → platform-lifecycle-vFqtNPPa.mjs} +1 -1
- package/dist/{platform-management-BSEc_ZeG.mjs → platform-management-BdYblvvE.mjs} +175 -32
- package/dist/{platform-management-Bp6aoH2C.mjs → platform-management-oi-SvI3f.mjs} +1 -1
- package/dist/{platform-plans-config-B0pOVQyW.mjs → platform-plans-config-CjiFv5J4.mjs} +5 -4
- package/dist/{platform-recovery-WOZ95Uze.mjs → platform-recovery-PvNS9Nl2.mjs} +3 -3
- package/dist/{platform-registry-KfNEF84O.mjs → platform-registry-P387v42A.mjs} +17 -10
- package/dist/platform-setup-DVe42Ws7.mjs +299 -0
- package/dist/{plugin-inference-CXWnn79A.mjs → plugin-inference-BlQbOL0P.mjs} +43 -42
- package/dist/prepare-DRUV-g3X.mjs +2 -0
- package/dist/{prepare-DnaKBi--.mjs → prepare-Do96654b.mjs} +8 -8
- package/dist/{prepare-39EvOhI6.mjs → prepare-Dq9hTIbo.mjs} +4 -3
- package/dist/{prerender-render-D9qbLs2f.mjs → prerender-render-Ct20jftc.mjs} +17 -3
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-IOjBU8R6.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-BkbfDs0V.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-Bs5A392E.mjs → project-cmd-ti8_yTcA.mjs} +19 -19
- package/dist/{project-team-ohAWWaew.mjs → project-team-CDPE1Tsg.mjs} +15 -18
- package/dist/{project-token-CP01Jna6.mjs → project-token-CkZ1cN0Z.mjs} +14 -17
- package/dist/{project-tsconfig-B8GeM0RM.mjs → project-tsconfig-CVJhNMxs.mjs} +2 -1
- package/dist/{project-zero-trust-BzkVgx35.mjs → project-zero-trust-DdjLR61k.mjs} +12 -9
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BPZaNqBo.d.mts} +4 -2
- package/dist/{protocol-U7bfjHmA.mjs → protocol-CfaUwNs8.mjs} +46 -49
- package/dist/{providers-CJlNS3kT.mjs → providers-BXuhmuub.mjs} +1 -12
- package/dist/{provision-Btj1jppf.mjs → provision-BfaLiWbj.mjs} +51 -42
- package/dist/{provision-BEv0k-qz.mjs → provision-Wu9ZBk9L.mjs} +2 -3
- package/dist/{requests-B3PBuGlX.mjs → requests-DFAqyYy8.mjs} +5 -5
- package/dist/resolve-project-BIeYs9Cw.mjs +2 -0
- package/dist/{resolve-project-BG5ORGID.mjs → resolve-project-CP8rZs_p.mjs} +6 -1
- package/dist/{rollback-DDub9GsO.mjs → rollback-BKYXBduI.mjs} +30 -37
- package/dist/{route-types-Clm4WD0B.mjs → route-types-CbtsIeFn.mjs} +1 -1
- package/dist/route-url-BgPja1GS.d.mts +5 -0
- package/dist/route-url-BjGv_KKY.mjs +28 -0
- package/dist/runner-9wjsSZx-.mjs +2 -0
- package/dist/{runner-Ol0TNjk6.mjs → runner-DMBKSrRk.mjs} +2 -2
- package/dist/{runner-mysql-DmWchSWJ.mjs → runner-mysql-CEzKtmFb.mjs} +8 -8
- package/dist/{runner-mysql-CEG5JozK.mjs → runner-mysql-CkFqZ6CE.mjs} +1 -1
- package/dist/{runner-pg-Bh4AgZdj.mjs → runner-pg-BGYRFdRp.mjs} +1 -1
- package/dist/runtime/ai.d.mts +11 -12
- package/dist/runtime/ai.mjs +47 -113
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +4 -9
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +5 -10
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +3 -3
- package/dist/runtime/client-react.d.mts +2 -3
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.d.mts +2 -3
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.d.mts +2 -3
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.d.mts +2 -3
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.d.mts +2 -3
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.mjs +3 -10
- package/dist/runtime/email/testing.mjs +5 -5
- package/dist/runtime/email.d.mts +2 -1
- package/dist/runtime/email.mjs +11 -27
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +15 -20
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +2 -3
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +10 -11
- package/dist/runtime/limits.d.mts +2 -2
- package/dist/runtime/limits.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-client.mjs +12 -22
- package/dist/runtime/live-server.mjs +27 -35
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +2 -2
- package/dist/runtime/migration-handler.mjs +35 -86
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.d.mts +2 -2
- package/dist/runtime/remote/binding-handler.mjs +8 -9
- package/dist/runtime/remote/index.mjs +27 -77
- package/dist/runtime/route-url.d.mts +2 -4
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +15 -26
- package/dist/runtime/sandbox.d.mts +1 -1
- package/dist/runtime/sandbox.mjs +14 -24
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +30 -61
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +1 -1
- package/dist/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
- package/dist/{scan-C7okrLyM.mjs → scan-C3uDzz6J.mjs} +21 -18
- package/dist/{secret-3c72lY1U.mjs → secret-BAt2KMmO.mjs} +15 -15
- package/dist/{skills-BPQUGClu.mjs → skills-BgVMvQdy.mjs} +2 -2
- package/dist/{sse-CQNaDFFV.mjs → sse-CMvCgjNk.mjs} +1 -1
- package/dist/{subcommand-prompt-Dhom39bd.mjs → subcommand-prompt-BSlnD1fI.mjs} +2 -2
- package/dist/sveltekit.d.mts +0 -2
- package/dist/terminal-log-text-D9ACPOuG.mjs +32 -0
- package/dist/validate-BJr9LfXy.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-C9qJArv7.mjs} +9 -28
- package/dist/{defer-YsYDUoii.mjs → validation-error-Dg9Recn1.mjs} +11 -11
- package/dist/{wrangler-DhUerFkW.mjs → wrangler-D9KTuqnv.mjs} +89 -194
- package/dist/{ws-CL1w7GXU.d.mts → ws-CChrrAU-.d.mts} +1 -1
- package/dist/{yarn-pnp-BV4AzNul.mjs → yarn-pnp-CUX_iTPA.mjs} +19 -27
- package/{skills/void/docs → docs}/guide/ai.md +69 -64
- package/{skills/void/docs → docs}/guide/app-types.md +1 -1
- package/{skills/void/docs → docs}/guide/auth.md +37 -1
- package/{skills/void/docs → docs}/guide/database/postgresql.md +2 -2
- package/{skills/void/docs → docs}/guide/database.md +23 -8
- package/{skills/void/docs → docs}/guide/edge/revalidation.md +1 -1
- package/{skills/void/docs → docs}/guide/edge/rewrites.md +2 -4
- package/{skills/void/docs → docs}/guide/email/receiving.md +2 -2
- package/{skills/void/docs → docs}/guide/email/sending.md +0 -2
- package/{skills/void/docs → docs}/guide/env-vars.md +4 -0
- package/{skills/void/docs → docs}/guide/jobs.md +2 -2
- package/{skills/void/docs → docs}/guide/live.md +12 -5
- package/{skills/void/docs → docs}/guide/pages-routing/actions-and-forms.md +21 -9
- package/{skills/void/docs → docs}/guide/pages-routing/loaders.md +7 -3
- package/{skills/void/docs → docs}/guide/pages-routing/markdown.md +15 -23
- package/{skills/void/docs → docs}/guide/pages-routing/overview.md +6 -4
- package/{skills/void/docs → docs}/guide/platform/administration/access.md +2 -10
- package/{skills/void/docs → docs}/guide/platform/administration/operations.md +3 -12
- package/{skills/void/docs → docs}/guide/platform/administration/projects.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/local.md +4 -2
- package/{skills/void/docs → docs}/guide/platform/development/runtime.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/schema-ci.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/installation/credentials.md +2 -2
- package/{skills/void/docs → docs}/guide/platform/installation/domains.md +3 -1
- package/{skills/void/docs → docs}/guide/platform/installation/first-deployment.md +8 -2
- package/{skills/void/docs → docs}/guide/platform/installation/maintenance.md +7 -1
- package/{skills/void/docs → docs}/guide/platform/installation/setup.md +1 -1
- package/docs/guide/platform/installation/uninstall.md +102 -0
- package/{skills/void/docs → docs}/guide/project-collaboration.md +6 -2
- package/{skills/void/docs → docs}/guide/queues.md +0 -2
- package/{skills/void/docs → docs}/guide/remote-dev.md +5 -5
- package/{skills/void/docs → docs}/guide/sandboxes.md +41 -22
- package/{skills/void/docs → docs}/guide/sse.md +0 -2
- package/{skills/void/docs → docs}/guide/storage.md +7 -2
- package/{skills/void/docs → docs}/guide/websockets.md +4 -0
- package/docs/integrations/agents.md +37 -0
- package/{skills/void/docs → docs}/integrations/frameworks/astro.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/nuxt.md +6 -2
- package/{skills/void/docs → docs}/integrations/hono.md +15 -7
- package/{skills/void/docs → docs}/integrations/nodejs-bun-deno.md +1 -0
- package/{skills/void/docs → docs}/reference/api/auth.md +1 -1
- package/{skills/void/docs → docs}/reference/api/handlers.md +4 -2
- package/{skills/void/docs → docs}/reference/api/pages.md +4 -0
- package/{skills/void/docs → docs}/reference/api/resources.md +11 -14
- package/{skills/void/docs → docs}/reference/api.md +35 -34
- package/{skills/void/docs → docs}/reference/cli/auth.md +3 -6
- package/{skills/void/docs → docs}/reference/cli/database.md +3 -4
- package/{skills/void/docs → docs}/reference/cli/generate.md +1 -1
- package/{skills/void/docs → docs}/reference/cli/github.md +3 -12
- package/{skills/void/docs → docs}/reference/cli/platform-config.md +3 -3
- package/{skills/void/docs → docs}/reference/cli/platform-email.md +2 -3
- package/{skills/void/docs → docs}/reference/cli/platform-installation.md +15 -13
- package/{skills/void/docs → docs}/reference/cli/platform-operations.md +3 -0
- package/{skills/void/docs → docs}/reference/cli/platform-users.md +2 -2
- package/{skills/void/docs → docs}/reference/cli/platform.md +4 -2
- package/{skills/void/docs → docs}/reference/cli/project.md +5 -4
- package/{skills/void/docs → docs}/reference/cli/secrets.md +3 -3
- package/{skills/void/docs → docs}/reference/cli/setup.md +9 -11
- package/{skills/void/docs → docs}/reference/cli.md +2 -2
- package/{skills/void/docs → docs}/reference/config.md +13 -13
- package/{skills/void/docs → docs}/reference/resource-inference.md +2 -16
- package/package.json +34 -30
- package/schema.json +1 -1
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +4 -1
- package/skills/void/SKILL.md +11 -5
- package/dist/cf-build-output-ChY6-XWP.mjs +0 -2
- package/dist/client-B4Me-9HE.mjs +0 -2
- package/dist/config-0acf1oys.mjs +0 -2
- package/dist/config-D8MOgiQV.mjs +0 -32
- package/dist/deploy-BDu1vhSH.mjs +0 -2
- package/dist/discover-AMCBXivQ.mjs +0 -2
- package/dist/fetch-error-Sp1R4mZv.d.mts +0 -20
- package/dist/gen-ById9r2j.mjs +0 -2
- package/dist/help-DPGBwomV.mjs +0 -2
- package/dist/login-C98-sw79.mjs +0 -2
- package/dist/migrate-CEu2X5DB.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-Cq6EjQro.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/resolve-project-DtbidV4y.mjs +0 -2
- package/dist/route-url-CG7U-cRN.mjs +0 -15
- package/dist/runner-CXA9Fh8h.mjs +0 -2
- package/dist/validate-Dq_L3s0S.mjs +0 -2
- package/skills/void/docs/guide/platform/installation/uninstall.md +0 -69
- package/skills/void/docs/integrations/agents.md +0 -26
- package/dist/{runner-pg-D4OPlil-.mjs → runner-pg-DV8p_zjA.mjs} +4 -4
- package/{skills/void/docs → docs}/guide/database/d1.md +2 -2
- package/{skills/void/docs → docs}/guide/database/mysql.md +0 -0
- package/{skills/void/docs → docs}/guide/deployment.md +0 -0
- package/{skills/void/docs → docs}/guide/durable-state.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/headers.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/prerendering.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/redirects.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/static-assets.md +0 -0
- package/{skills/void/docs → docs}/guide/email/domains.md +0 -0
- package/{skills/void/docs → docs}/guide/email.md +0 -0
- package/{skills/void/docs → docs}/guide/index.md +0 -0
- package/{skills/void/docs → docs}/guide/kv.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/head.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/islands.md +2 -2
- package/{skills/void/docs → docs}/guide/pages-routing/layouts.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/view-transitions.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/email.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/plans.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/zero-trust.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/ci.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/prerequisites.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-administration.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-development.md +0 -0
- package/{skills/void/docs → docs}/guide/quickstart.md +0 -0
- package/{skills/void/docs → docs}/guide/self-hosted-platform.md +0 -0
- package/{skills/void/docs → docs}/guide/server-routing.md +3 -3
- package/{skills/void/docs → docs}/guide/ssg.md +0 -0
- package/{skills/void/docs → docs}/guide/ssr.md +0 -0
- package/{skills/void/docs → docs}/guide/type-safety.md +0 -0
- package/{skills/void/docs → docs}/guide/typed-fetch.md +0 -0
- package/{skills/void/docs → docs}/index.md +0 -0
- package/{skills/void/docs → docs}/integrations/cloudflare.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/analog.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/overview.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/react-router.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/sveltekit.md +1 -1
- package/{skills/void/docs → docs}/integrations/frameworks/tanstack-start.md +2 -2
- package/{skills/void/docs → docs}/reference/api/client.md +0 -0
- package/{skills/void/docs → docs}/reference/api/database.md +2 -2
- /package/{skills/void/docs → docs}/reference/api/durable.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/env.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/plugin.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/rewrites.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/types.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/deploy.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/domains.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/email.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/platform-zero-trust.md +0 -0
- /package/{skills/void/docs → docs}/reference/structure.md +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { a as join, l as relative, r as extname, t as basename, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
2
|
+
import { r as detectFramework } from "./plugin-inference-BlQbOL0P.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
4
|
-
import { h as resolveBindingNames, m as readConfig, u as getDatabaseDialect } from "./config-
|
|
4
|
+
import { h as resolveBindingNames, m as readConfig, u as getDatabaseDialect } from "./config-DiowPT80.mjs";
|
|
5
5
|
import { i as writeJournal, n as readJournal, r as stripSqlExt, t as collectMigrations } from "./collect-DiTn9yr6.mjs";
|
|
6
|
-
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
7
|
-
import { t as resolveLocalD1Target } from "./local-d1-
|
|
6
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
7
|
+
import { t as resolveLocalD1Target } from "./local-d1-ga5O_idV.mjs";
|
|
8
8
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
9
|
-
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, r as ensurePlatformProxyAccess } from "./cf-access-
|
|
10
|
-
import { c as getToken, o as getProxyUrl } from "./auth-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { i as validateMigrations, r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-
|
|
16
|
-
import { n as formatTimestamp } from "./gen-
|
|
9
|
+
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, r as ensurePlatformProxyAccess } from "./cf-access-ngGqZpHZ.mjs";
|
|
10
|
+
import { c as getToken, o as getProxyUrl } from "./auth-B5_tZLxT.mjs";
|
|
11
|
+
import { A as confirm, H as outro, L as log, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
12
|
+
import { d as printSuccess, i as dim, l as import_picocolors, s as formatCount } from "./output-C50ag2r3.mjs";
|
|
13
|
+
import { o as loadLocalEnv } from "./env-BxocywBB.mjs";
|
|
14
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-C2Prx_Bi.mjs";
|
|
15
|
+
import { i as validateMigrations, r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-C9qJArv7.mjs";
|
|
16
|
+
import { n as formatTimestamp } from "./gen-DtkQhvQg.mjs";
|
|
17
17
|
import { createRequire } from "node:module";
|
|
18
18
|
import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -146,6 +146,27 @@ function runDrizzleKit(root, args) {
|
|
|
146
146
|
stdio: "inherit"
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Run a drizzle-kit command against a real database URL. The config holding
|
|
151
|
+
* the URL lives in a private temp directory outside the project and is
|
|
152
|
+
* removed afterwards. Exits with code 1 when drizzle-kit fails; it has
|
|
153
|
+
* already printed its own error.
|
|
154
|
+
*/
|
|
155
|
+
async function runDrizzleKitWithDatabaseUrl(root, url, dialect, command) {
|
|
156
|
+
const { withPrivateDrizzleConfig } = await import("./config-BtSFvXZx.mjs");
|
|
157
|
+
if (!withPrivateDrizzleConfig(root, url, dialect, (configPath) => {
|
|
158
|
+
try {
|
|
159
|
+
runDrizzleKit(root, [
|
|
160
|
+
command,
|
|
161
|
+
"--config",
|
|
162
|
+
configPath
|
|
163
|
+
]);
|
|
164
|
+
return true;
|
|
165
|
+
} catch {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
})) process.exit(1);
|
|
169
|
+
}
|
|
149
170
|
function getErrorMessage(error) {
|
|
150
171
|
return error instanceof Error ? error.message : String(error);
|
|
151
172
|
}
|
|
@@ -266,11 +287,11 @@ async function runConnect(root, dialect, args) {
|
|
|
266
287
|
region: args.region
|
|
267
288
|
});
|
|
268
289
|
connectionString = result.connectionString;
|
|
269
|
-
log.
|
|
290
|
+
log.step(`Provisioned ${adapter.label} database.`);
|
|
270
291
|
if (result.dashboardUrl) log.info(`Dashboard: ${result.dashboardUrl}`);
|
|
271
292
|
}
|
|
272
293
|
if (!connectionString) {
|
|
273
|
-
const { text: promptText, isCancel: isCancelCheck } = await import("./
|
|
294
|
+
const { text: promptText, isCancel: isCancelCheck } = await import("./dist-Bx1z6Eva.mjs");
|
|
274
295
|
const answer = await promptText({
|
|
275
296
|
message: `Enter your ${dialect === "mysql" ? "MySQL" : "PostgreSQL"} connection string:`,
|
|
276
297
|
placeholder: dialect === "mysql" ? "mysql://user:pass@host:3306/database" : "postgresql://user:pass@host:5432/database"
|
|
@@ -281,28 +302,29 @@ async function runConnect(root, dialect, args) {
|
|
|
281
302
|
const parsed = new URL(connectionString);
|
|
282
303
|
if (!(dialect === "mysql" ? ["mysql:"] : ["postgres:", "postgresql:"]).includes(parsed.protocol)) throw new Error(`Connection string protocol '${parsed.protocol}' does not match the configured ${dialect} dialect.`);
|
|
283
304
|
writeLocalDatabaseUrl(root, connectionString);
|
|
284
|
-
log.
|
|
305
|
+
log.step("Saved DATABASE_URL to .env.");
|
|
285
306
|
if (!args.localOnly) {
|
|
286
307
|
const token = getToken(root);
|
|
287
308
|
const projectConfig = readProjectConfig(root);
|
|
288
309
|
if (token && projectConfig) {
|
|
289
310
|
await new PlatformClient(token, { root }).setDatabaseUrl(projectConfig.projectId, connectionString);
|
|
290
|
-
log.
|
|
311
|
+
log.step("Updated the linked Void project database URL.");
|
|
291
312
|
} else log.info("No authenticated Void project is linked, so only local configuration was updated.");
|
|
292
313
|
}
|
|
293
|
-
|
|
314
|
+
printSuccess("Database connected.");
|
|
294
315
|
}
|
|
295
316
|
async function runPush(root, dialect) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
const { mkdirSync } = await import("node:fs");
|
|
301
|
-
const { dirname } = await import("./dist-_UUlL6bg.mjs");
|
|
302
|
-
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
303
|
-
mkdirSync(dirname(dbPath), { recursive: true });
|
|
304
|
-
configPath = writeDrizzleConfig(root, dbPath);
|
|
317
|
+
if (dialect !== "sqlite") {
|
|
318
|
+
await runDrizzleKitWithDatabaseUrl(root, dialect === "mysql" ? getMySqlUrl(root) : getPgUrl(root), dialect, "push");
|
|
319
|
+
printSuccess("Database schema pushed.");
|
|
320
|
+
return;
|
|
305
321
|
}
|
|
322
|
+
const { writeDrizzleConfig } = await import("./config-BtSFvXZx.mjs");
|
|
323
|
+
const { mkdirSync } = await import("node:fs");
|
|
324
|
+
const { dirname } = await import("./dist-_UUlL6bg.mjs");
|
|
325
|
+
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
326
|
+
mkdirSync(dirname(dbPath), { recursive: true });
|
|
327
|
+
const configPath = writeDrizzleConfig(root, dbPath);
|
|
306
328
|
try {
|
|
307
329
|
runDrizzleKit(root, [
|
|
308
330
|
"push",
|
|
@@ -312,11 +334,11 @@ async function runPush(root, dialect) {
|
|
|
312
334
|
} catch {
|
|
313
335
|
process.exit(1);
|
|
314
336
|
}
|
|
315
|
-
|
|
337
|
+
printSuccess("Database schema pushed.");
|
|
316
338
|
}
|
|
317
339
|
async function runGenerate(root, dialect) {
|
|
318
|
-
const { prepareProject } = await import("./prepare-
|
|
319
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
340
|
+
const { prepareProject } = await import("./prepare-DRUV-g3X.mjs");
|
|
341
|
+
const { writeDrizzleConfig } = await import("./config-BtSFvXZx.mjs");
|
|
320
342
|
await prepareProject(root);
|
|
321
343
|
const authSchemaPath = join(root, ".void", "better-auth-schema.ts");
|
|
322
344
|
const additionalSchemas = existsSync(authSchemaPath) ? [authSchemaPath] : void 0;
|
|
@@ -340,7 +362,7 @@ async function runGenerate(root, dialect) {
|
|
|
340
362
|
log.error(getErrorMessage(error));
|
|
341
363
|
process.exit(1);
|
|
342
364
|
}
|
|
343
|
-
|
|
365
|
+
printSuccess("Migration generation complete.");
|
|
344
366
|
}
|
|
345
367
|
async function runStatus(root, dialect) {
|
|
346
368
|
const paths = readProjectPaths(root);
|
|
@@ -354,7 +376,6 @@ async function runStatus(root, dialect) {
|
|
|
354
376
|
}
|
|
355
377
|
if (allMigrations.length === 0) {
|
|
356
378
|
log.info(`No migration files found in ${paths.sourceRelative("db/migrations")}/`);
|
|
357
|
-
outro("Done.");
|
|
358
379
|
return;
|
|
359
380
|
}
|
|
360
381
|
let localApplied;
|
|
@@ -381,7 +402,7 @@ async function runStatus(root, dialect) {
|
|
|
381
402
|
localApplied = [];
|
|
382
403
|
}
|
|
383
404
|
else {
|
|
384
|
-
const { getAppliedMigrations } = await import("./runner-
|
|
405
|
+
const { getAppliedMigrations } = await import("./runner-9wjsSZx-.mjs");
|
|
385
406
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
386
407
|
localApplied = await getAppliedMigrations(dbPath);
|
|
387
408
|
}
|
|
@@ -391,12 +412,12 @@ async function runStatus(root, dialect) {
|
|
|
391
412
|
if (dialect !== "sqlite") {
|
|
392
413
|
const databaseUrl = process.env.DATABASE_URL;
|
|
393
414
|
if (!databaseUrl) throw new Error("DATABASE_URL is not available.");
|
|
394
|
-
remoteApplied = (dialect === "postgresql" ? await (await import("./runner-pg-
|
|
415
|
+
remoteApplied = (dialect === "postgresql" ? await (await import("./runner-pg-BGYRFdRp.mjs")).getPgAppliedMigrations(databaseUrl) : await (await import("./runner-mysql-CkFqZ6CE.mjs")).getMySqlAppliedMigrations(databaseUrl)).map((name) => ({
|
|
395
416
|
name,
|
|
396
417
|
applied_at: ""
|
|
397
418
|
}));
|
|
398
419
|
} else {
|
|
399
|
-
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
420
|
+
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-BlYLlowZ.mjs");
|
|
400
421
|
remoteApplied = (await readCloudflareD1Migrations(resolveCloudflareD1Context(root, resolveBindingNames(readConfig(root).inference?.bindings)?.d1 ?? "DB"))).map((name) => ({
|
|
401
422
|
name,
|
|
402
423
|
applied_at: ""
|
|
@@ -472,12 +493,12 @@ async function resetDatabase(root, dialect) {
|
|
|
472
493
|
}
|
|
473
494
|
});
|
|
474
495
|
if (migrations.length > 0) {
|
|
475
|
-
const { applyMySqlMigrations } = await import("./runner-mysql-
|
|
496
|
+
const { applyMySqlMigrations } = await import("./runner-mysql-CkFqZ6CE.mjs");
|
|
476
497
|
await withMySqlClient(root, (client) => applyMySqlMigrations(client, migrations));
|
|
477
498
|
}
|
|
478
499
|
return migrations.length;
|
|
479
500
|
}
|
|
480
|
-
const { runMigrations } = await import("./runner-
|
|
501
|
+
const { runMigrations } = await import("./runner-9wjsSZx-.mjs");
|
|
481
502
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
482
503
|
rmSync(dbPath, { force: true });
|
|
483
504
|
rmSync(dbPath + "-wal", { force: true });
|
|
@@ -486,9 +507,8 @@ async function resetDatabase(root, dialect) {
|
|
|
486
507
|
}
|
|
487
508
|
async function runReset(root, dialect) {
|
|
488
509
|
const count = await resetDatabase(root, dialect);
|
|
489
|
-
log.success(`Database reset. Applied ${formatCount(count, "migration")}.`);
|
|
490
510
|
if (dialect === "sqlite") log.info(dim("Restart your dev server if it's running."));
|
|
491
|
-
|
|
511
|
+
printSuccess(`Database reset. Applied ${formatCount(count, "migration")}.`);
|
|
492
512
|
}
|
|
493
513
|
async function runSeed(root, file, dialect) {
|
|
494
514
|
const migrationCount = await resetDatabase(root, dialect);
|
|
@@ -500,19 +520,17 @@ async function runSeed(root, file, dialect) {
|
|
|
500
520
|
await withPgClient(root, async (client) => {
|
|
501
521
|
await client.query(sql);
|
|
502
522
|
});
|
|
503
|
-
|
|
504
|
-
outro("Done.");
|
|
523
|
+
printSuccess(`Seeded from ${seed.displayPath}.`);
|
|
505
524
|
return;
|
|
506
525
|
}
|
|
507
526
|
if (dialect === "mysql") {
|
|
508
527
|
await withMySqlClient(root, async (client) => {
|
|
509
528
|
await client.query(sql);
|
|
510
529
|
});
|
|
511
|
-
|
|
512
|
-
outro("Done.");
|
|
530
|
+
printSuccess(`Seeded from ${seed.displayPath}.`);
|
|
513
531
|
return;
|
|
514
532
|
}
|
|
515
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
533
|
+
const { openSqliteDatabase } = await import("./runner-9wjsSZx-.mjs");
|
|
516
534
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
517
535
|
const db = await openSqliteDatabase(dbPath);
|
|
518
536
|
try {
|
|
@@ -521,9 +539,8 @@ async function runSeed(root, file, dialect) {
|
|
|
521
539
|
db.close();
|
|
522
540
|
}
|
|
523
541
|
} else await runSeedModule(root, seed.path, dialect);
|
|
524
|
-
log.success(`Seeded from ${seed.displayPath}.`);
|
|
525
542
|
log.info(dim("Restart your dev server if it's running."));
|
|
526
|
-
|
|
543
|
+
printSuccess(`Seeded from ${seed.displayPath}.`);
|
|
527
544
|
}
|
|
528
545
|
/**
|
|
529
546
|
* Returns true when the SQL is read-only (SELECT / EXPLAIN only).
|
|
@@ -535,7 +552,7 @@ async function runSeed(root, file, dialect) {
|
|
|
535
552
|
* users` or `EXPLAIN -- c\n ANALYZE ...` can't bypass the EXPLAIN ANALYZE
|
|
536
553
|
* check by hiding the `ANALYZE` keyword behind a comment that PostgreSQL
|
|
537
554
|
* treats as whitespace. This also handles leading comments, so
|
|
538
|
-
* `-- header\nSELECT 1` is
|
|
555
|
+
* `-- header\nSELECT 1` is classified as safe.
|
|
539
556
|
* - The comment-stripping regex is naive and doesn't understand string
|
|
540
557
|
* literals: a string literal containing a block-comment marker will have its
|
|
541
558
|
* contents stripped. That's harmless here (still classified as SELECT, still
|
|
@@ -594,7 +611,6 @@ async function executeExternalRemoteSql(dialect, dbUrl, sql) {
|
|
|
594
611
|
try {
|
|
595
612
|
const result = await pgClient.query(sql);
|
|
596
613
|
if (result.rows && result.rows.length > 0) printTable(result.rows);
|
|
597
|
-
else log.success("Executed successfully.");
|
|
598
614
|
} finally {
|
|
599
615
|
await pgClient.end();
|
|
600
616
|
}
|
|
@@ -608,7 +624,6 @@ async function executeExternalRemoteSql(dialect, dbUrl, sql) {
|
|
|
608
624
|
try {
|
|
609
625
|
const [rows] = await mySqlClient.query(sql);
|
|
610
626
|
if (Array.isArray(rows) && rows.length > 0) printTable(rows);
|
|
611
|
-
else log.success("Executed successfully.");
|
|
612
627
|
} finally {
|
|
613
628
|
await mySqlClient.end();
|
|
614
629
|
}
|
|
@@ -638,10 +653,9 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
638
653
|
process.exit(0);
|
|
639
654
|
}
|
|
640
655
|
if (dialect === "sqlite") {
|
|
641
|
-
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
656
|
+
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-BlYLlowZ.mjs");
|
|
642
657
|
const rows = await executeCloudflareD1Sql(resolveCloudflareD1Context(root, resolveBindingNames(readConfig(root).inference?.bindings)?.d1 ?? "DB"), sql);
|
|
643
658
|
if (rows.length > 0) printTable(rows);
|
|
644
|
-
else log.success("Executed successfully.");
|
|
645
659
|
} else {
|
|
646
660
|
const dbUrl = process.env.DATABASE_URL;
|
|
647
661
|
if (!dbUrl) {
|
|
@@ -650,7 +664,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
650
664
|
}
|
|
651
665
|
await executeExternalRemoteSql(dialect, dbUrl, sql);
|
|
652
666
|
}
|
|
653
|
-
|
|
667
|
+
printSuccess("SQL executed successfully.");
|
|
654
668
|
return;
|
|
655
669
|
}
|
|
656
670
|
const token = getToken(root);
|
|
@@ -669,7 +683,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
669
683
|
}
|
|
670
684
|
if (dialect !== "sqlite") {
|
|
671
685
|
await executeExternalRemoteSql(dialect, await fetchRemoteDatabaseUrl(new PlatformClient(token, { root }), projectConfig.projectId), sql);
|
|
672
|
-
|
|
686
|
+
printSuccess("SQL executed successfully.");
|
|
673
687
|
return;
|
|
674
688
|
}
|
|
675
689
|
const platformClient = new PlatformClient(token, { root });
|
|
@@ -719,8 +733,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
719
733
|
}
|
|
720
734
|
const rows = (await res.json()).results ?? [];
|
|
721
735
|
if (rows.length > 0) printTable(rows);
|
|
722
|
-
|
|
723
|
-
outro("Done.");
|
|
736
|
+
printSuccess("SQL executed successfully.");
|
|
724
737
|
return;
|
|
725
738
|
}
|
|
726
739
|
if (dialect === "postgresql") {
|
|
@@ -728,9 +741,8 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
728
741
|
await withPgClient(root, async (client) => {
|
|
729
742
|
const result = await client.query(sql);
|
|
730
743
|
if (result.rows && result.rows.length > 0) printTable(result.rows);
|
|
731
|
-
else log.success("Executed successfully.");
|
|
732
744
|
});
|
|
733
|
-
|
|
745
|
+
printSuccess("SQL executed successfully.");
|
|
734
746
|
return;
|
|
735
747
|
}
|
|
736
748
|
if (dialect === "mysql") {
|
|
@@ -738,12 +750,11 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
738
750
|
await withMySqlClient(root, async (client) => {
|
|
739
751
|
const rows = await client.query(sql);
|
|
740
752
|
if (rows.length > 0) printTable(rows);
|
|
741
|
-
else log.success("Executed successfully.");
|
|
742
753
|
});
|
|
743
|
-
|
|
754
|
+
printSuccess("SQL executed successfully.");
|
|
744
755
|
return;
|
|
745
756
|
}
|
|
746
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
757
|
+
const { openSqliteDatabase } = await import("./runner-9wjsSZx-.mjs");
|
|
747
758
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
748
759
|
if (!existsSync(dbPath)) {
|
|
749
760
|
log.error("No local database found. Run `void dev` first.");
|
|
@@ -757,14 +768,11 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
757
768
|
const rows = db.prepare(sql).all();
|
|
758
769
|
if (rows.length === 0) log.info("No rows returned.");
|
|
759
770
|
else printTable(rows);
|
|
760
|
-
} else
|
|
761
|
-
db.exec(sql);
|
|
762
|
-
log.success("Executed successfully.");
|
|
763
|
-
}
|
|
771
|
+
} else db.exec(sql);
|
|
764
772
|
} finally {
|
|
765
773
|
db.close();
|
|
766
774
|
}
|
|
767
|
-
|
|
775
|
+
printSuccess("SQL executed successfully.");
|
|
768
776
|
}
|
|
769
777
|
function printTable(rows) {
|
|
770
778
|
const cols = Object.keys(rows[0]);
|
|
@@ -799,7 +807,6 @@ async function runMigrate(root, dialect, remote) {
|
|
|
799
807
|
}
|
|
800
808
|
if (rawMigrations.length === 0) {
|
|
801
809
|
log.info(`No migration files found in ${paths.sourceRelative("db/migrations")}/`);
|
|
802
|
-
outro("Done.");
|
|
803
810
|
return;
|
|
804
811
|
}
|
|
805
812
|
const databaseUrl = process.env.DATABASE_URL;
|
|
@@ -811,11 +818,11 @@ async function runMigrate(root, dialect, remote) {
|
|
|
811
818
|
let appliedNames;
|
|
812
819
|
let applyMigrations;
|
|
813
820
|
if (dialect === "postgresql") {
|
|
814
|
-
const { getPgAppliedMigrations, runPgMigrations } = await import("./runner-pg-
|
|
821
|
+
const { getPgAppliedMigrations, runPgMigrations } = await import("./runner-pg-BGYRFdRp.mjs");
|
|
815
822
|
appliedNames = await getPgAppliedMigrations(databaseUrl);
|
|
816
823
|
applyMigrations = () => runPgMigrations(migrationsDir, databaseUrl);
|
|
817
824
|
} else {
|
|
818
|
-
const { getMySqlAppliedMigrations, runMySqlMigrations } = await import("./runner-mysql-
|
|
825
|
+
const { getMySqlAppliedMigrations, runMySqlMigrations } = await import("./runner-mysql-CkFqZ6CE.mjs");
|
|
819
826
|
appliedNames = await getMySqlAppliedMigrations(databaseUrl);
|
|
820
827
|
applyMigrations = () => runMySqlMigrations(migrationsDir, databaseUrl);
|
|
821
828
|
}
|
|
@@ -823,14 +830,12 @@ async function runMigrate(root, dialect, remote) {
|
|
|
823
830
|
const pending = rawMigrations.filter((migration) => !appliedSet.has(migration.name));
|
|
824
831
|
if (pending.length === 0) {
|
|
825
832
|
log.info("Remote database is up to date.");
|
|
826
|
-
outro("Done.");
|
|
827
833
|
return;
|
|
828
834
|
}
|
|
829
835
|
validateMigrations(pending);
|
|
830
836
|
const applied = await applyMigrations();
|
|
831
837
|
for (const migration of applied) log.step(migration);
|
|
832
|
-
|
|
833
|
-
outro("Done.");
|
|
838
|
+
printSuccess(`Applied ${formatCount(applied.length, "migration")} to remote database.`);
|
|
834
839
|
return;
|
|
835
840
|
} catch (error) {
|
|
836
841
|
log.error(`db: Remote ${dialect} migrations failed — ${getErrorMessage(error)}`);
|
|
@@ -840,17 +845,15 @@ async function runMigrate(root, dialect, remote) {
|
|
|
840
845
|
if (deploymentPlatform === "cloudflare") {
|
|
841
846
|
if (rawMigrations.length === 0) {
|
|
842
847
|
log.info(`No migration files found in ${paths.sourceRelative("db/migrations")}/`);
|
|
843
|
-
outro("Done.");
|
|
844
848
|
return;
|
|
845
849
|
}
|
|
846
|
-
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
850
|
+
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-BlYLlowZ.mjs");
|
|
847
851
|
const binding = resolveBindingNames(readConfig(root).inference?.bindings)?.d1 ?? "DB";
|
|
848
852
|
const context = resolveCloudflareD1Context(root, binding);
|
|
849
853
|
const remoteBefore = new Set(await readCloudflareD1Migrations(context));
|
|
850
854
|
const pending = rawMigrations.filter((migration) => !remoteBefore.has(migration.name));
|
|
851
855
|
if (pending.length === 0) {
|
|
852
856
|
log.info("Remote database is up to date.");
|
|
853
|
-
outro("Done.");
|
|
854
857
|
return;
|
|
855
858
|
}
|
|
856
859
|
try {
|
|
@@ -859,7 +862,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
859
862
|
log.error(getErrorMessage(error));
|
|
860
863
|
process.exit(1);
|
|
861
864
|
}
|
|
862
|
-
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-
|
|
865
|
+
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-C1d-YTfp.mjs");
|
|
863
866
|
const applySet = await checkWranglerMigrationApplySet(context.operation.configPath, parseRootWranglerConfig(context.operation.configPath), binding, context.migrationsDir, rawMigrations);
|
|
864
867
|
if (!applySet.ok) {
|
|
865
868
|
log.error(applySet.reason);
|
|
@@ -873,8 +876,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
873
876
|
process.exit(1);
|
|
874
877
|
}
|
|
875
878
|
for (const migration of pending) log.step(migration.name);
|
|
876
|
-
|
|
877
|
-
outro("Done.");
|
|
879
|
+
printSuccess(`Applied ${formatCount(pending.length, "migration")} to remote database.`);
|
|
878
880
|
return;
|
|
879
881
|
}
|
|
880
882
|
const token = getToken(root);
|
|
@@ -889,7 +891,6 @@ async function runMigrate(root, dialect, remote) {
|
|
|
889
891
|
}
|
|
890
892
|
if (rawMigrations.length === 0) {
|
|
891
893
|
log.info(`No migration files found in ${paths.sourceRelative("db/migrations")}/`);
|
|
892
|
-
outro("Done.");
|
|
893
894
|
return;
|
|
894
895
|
}
|
|
895
896
|
const client = new PlatformClient(token, { root });
|
|
@@ -904,7 +905,6 @@ async function runMigrate(root, dialect, remote) {
|
|
|
904
905
|
const pendingMigrations = rawMigrations.filter((m) => !remoteApplied.has(m.name));
|
|
905
906
|
if (pendingMigrations.length === 0) {
|
|
906
907
|
log.info("Remote database is up to date.");
|
|
907
|
-
outro("Done.");
|
|
908
908
|
return;
|
|
909
909
|
}
|
|
910
910
|
try {
|
|
@@ -919,16 +919,13 @@ async function runMigrate(root, dialect, remote) {
|
|
|
919
919
|
process.exit(1);
|
|
920
920
|
}
|
|
921
921
|
if (result.applied.length === 0) log.info("Remote database is up to date.");
|
|
922
|
-
else
|
|
923
|
-
for (const name of result.applied) log.step(name);
|
|
924
|
-
log.success(`Applied ${formatCount(result.applied.length, "migration")} to remote database.`);
|
|
925
|
-
}
|
|
922
|
+
else for (const name of result.applied) log.step(name);
|
|
926
923
|
for (const warning of result.warnings ?? []) log.warn(warning);
|
|
927
|
-
|
|
924
|
+
if (result.applied.length > 0) printSuccess(`Applied ${formatCount(result.applied.length, "migration")} to remote database.`);
|
|
928
925
|
return;
|
|
929
926
|
}
|
|
930
927
|
if (dialect === "postgresql") {
|
|
931
|
-
const { applyPgMigrations } = await import("./runner-pg-
|
|
928
|
+
const { applyPgMigrations } = await import("./runner-pg-BGYRFdRp.mjs");
|
|
932
929
|
const applied = await withPgClient(root, async (client) => {
|
|
933
930
|
let existingRows = [];
|
|
934
931
|
try {
|
|
@@ -947,13 +944,12 @@ async function runMigrate(root, dialect, remote) {
|
|
|
947
944
|
if (applied.length === 0) log.info("All migrations are up to date.");
|
|
948
945
|
else {
|
|
949
946
|
for (const name of applied) log.step(name);
|
|
950
|
-
|
|
947
|
+
printSuccess(`Applied ${formatCount(applied.length, "migration")}.`);
|
|
951
948
|
}
|
|
952
|
-
outro("Done.");
|
|
953
949
|
return;
|
|
954
950
|
}
|
|
955
951
|
if (dialect === "mysql") {
|
|
956
|
-
const { applyMySqlMigrations } = await import("./runner-mysql-
|
|
952
|
+
const { applyMySqlMigrations } = await import("./runner-mysql-CkFqZ6CE.mjs");
|
|
957
953
|
const applied = await withMySqlClient(root, async (client) => {
|
|
958
954
|
let existingRows = [];
|
|
959
955
|
try {
|
|
@@ -972,12 +968,11 @@ async function runMigrate(root, dialect, remote) {
|
|
|
972
968
|
if (applied.length === 0) log.info("All migrations are up to date.");
|
|
973
969
|
else {
|
|
974
970
|
for (const name of applied) log.step(name);
|
|
975
|
-
|
|
971
|
+
printSuccess(`Applied ${formatCount(applied.length, "migration")}.`);
|
|
976
972
|
}
|
|
977
|
-
outro("Done.");
|
|
978
973
|
return;
|
|
979
974
|
}
|
|
980
|
-
const { getAppliedMigrations, runMigrations } = await import("./runner-
|
|
975
|
+
const { getAppliedMigrations, runMigrations } = await import("./runner-9wjsSZx-.mjs");
|
|
981
976
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
982
977
|
try {
|
|
983
978
|
const existingRows = await getAppliedMigrations(dbPath);
|
|
@@ -990,10 +985,9 @@ async function runMigrate(root, dialect, remote) {
|
|
|
990
985
|
if (applied.length === 0) log.info("All migrations are up to date.");
|
|
991
986
|
else {
|
|
992
987
|
for (const name of applied) log.step(name);
|
|
993
|
-
log.success(`Applied ${formatCount(applied.length, "migration")}.`);
|
|
994
988
|
log.info(dim("Restart your dev server if it's running."));
|
|
989
|
+
printSuccess(`Applied ${formatCount(applied.length, "migration")}.`);
|
|
995
990
|
}
|
|
996
|
-
outro("Done.");
|
|
997
991
|
}
|
|
998
992
|
async function runStudio(root, dialect, remote) {
|
|
999
993
|
if (remote) {
|
|
@@ -1021,36 +1015,17 @@ async function runStudio(root, dialect, remote) {
|
|
|
1021
1015
|
}
|
|
1022
1016
|
dbUrl = await fetchRemoteDatabaseUrl(new PlatformClient(token, { root }), projectConfig.projectId);
|
|
1023
1017
|
}
|
|
1024
|
-
const { writeDrizzleConfig } = await import("./config-0acf1oys.mjs");
|
|
1025
|
-
const configPath = writeDrizzleConfig(root, dbUrl, dialect);
|
|
1026
1018
|
log.info("Opening Drizzle Studio (remote)...");
|
|
1027
|
-
|
|
1028
|
-
runDrizzleKit(root, [
|
|
1029
|
-
"studio",
|
|
1030
|
-
"--config",
|
|
1031
|
-
configPath
|
|
1032
|
-
]);
|
|
1033
|
-
} catch {
|
|
1034
|
-
process.exit(1);
|
|
1035
|
-
}
|
|
1019
|
+
await runDrizzleKitWithDatabaseUrl(root, dbUrl, dialect, "studio");
|
|
1036
1020
|
return;
|
|
1037
1021
|
}
|
|
1038
1022
|
if (dialect !== "sqlite") {
|
|
1039
|
-
const
|
|
1040
|
-
const configPath = writeDrizzleConfig(root, dialect === "mysql" ? getMySqlUrl(root) : getPgUrl(root), dialect);
|
|
1023
|
+
const url = dialect === "mysql" ? getMySqlUrl(root) : getPgUrl(root);
|
|
1041
1024
|
log.info("Opening Drizzle Studio...");
|
|
1042
|
-
|
|
1043
|
-
runDrizzleKit(root, [
|
|
1044
|
-
"studio",
|
|
1045
|
-
"--config",
|
|
1046
|
-
configPath
|
|
1047
|
-
]);
|
|
1048
|
-
} catch {
|
|
1049
|
-
process.exit(1);
|
|
1050
|
-
}
|
|
1025
|
+
await runDrizzleKitWithDatabaseUrl(root, url, dialect, "studio");
|
|
1051
1026
|
return;
|
|
1052
1027
|
}
|
|
1053
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
1028
|
+
const { writeDrizzleConfig } = await import("./config-BtSFvXZx.mjs");
|
|
1054
1029
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1055
1030
|
if (!existsSync(dbPath)) {
|
|
1056
1031
|
log.error("No local database found. Run `void dev` first.");
|
|
@@ -1072,7 +1047,6 @@ async function runRenameMigrations(root, dialect) {
|
|
|
1072
1047
|
const migrationsDir = readProjectPaths(root).migrationsDir;
|
|
1073
1048
|
if (!existsSync(migrationsDir)) {
|
|
1074
1049
|
log.info("No migrations directory found.");
|
|
1075
|
-
outro("Done.");
|
|
1076
1050
|
return;
|
|
1077
1051
|
}
|
|
1078
1052
|
const currentMigrations = collectMigrations(migrationsDir);
|
|
@@ -1090,7 +1064,6 @@ async function runRenameMigrations(root, dialect) {
|
|
|
1090
1064
|
const oldStyleFiles = files.filter((f) => /^\d{1,4}_/.test(f));
|
|
1091
1065
|
if (oldStyleFiles.length === 0) {
|
|
1092
1066
|
log.info("No migrations with numeric prefixes found. Nothing to rename.");
|
|
1093
|
-
outro("Done.");
|
|
1094
1067
|
return;
|
|
1095
1068
|
}
|
|
1096
1069
|
const timestampFiles = files.filter((f) => /^\d{14}_/.test(f));
|
|
@@ -1287,7 +1260,7 @@ async function runRenameMigrations(root, dialect) {
|
|
|
1287
1260
|
process.exit(1);
|
|
1288
1261
|
}
|
|
1289
1262
|
else {
|
|
1290
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
1263
|
+
const { openSqliteDatabase } = await import("./runner-9wjsSZx-.mjs");
|
|
1291
1264
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1292
1265
|
if (existsSync(dbPath)) try {
|
|
1293
1266
|
const db = await openSqliteDatabase(dbPath);
|
|
@@ -1316,8 +1289,7 @@ async function runRenameMigrations(root, dialect) {
|
|
|
1316
1289
|
process.exit(1);
|
|
1317
1290
|
}
|
|
1318
1291
|
}
|
|
1319
|
-
|
|
1320
|
-
outro("Done.");
|
|
1292
|
+
printSuccess(`Renamed ${formatCount(renames.length, "migration")} to timestamp format.`);
|
|
1321
1293
|
}
|
|
1322
1294
|
function formatMySqlExportValue(value) {
|
|
1323
1295
|
if (value === null || value === void 0) return "NULL";
|
|
@@ -1397,8 +1369,7 @@ async function runExport(root, args, dialect) {
|
|
|
1397
1369
|
const output = parts.join("\n");
|
|
1398
1370
|
if (args.output) {
|
|
1399
1371
|
writeFileSync(join(root, args.output), output);
|
|
1400
|
-
|
|
1401
|
-
outro("Done.");
|
|
1372
|
+
printSuccess(`Exported to ${args.output}`);
|
|
1402
1373
|
} else process.stdout.write(output);
|
|
1403
1374
|
return;
|
|
1404
1375
|
}
|
|
@@ -1434,12 +1405,11 @@ async function runExport(root, args, dialect) {
|
|
|
1434
1405
|
const output = parts.join("\n");
|
|
1435
1406
|
if (args.output) {
|
|
1436
1407
|
writeFileSync(join(root, args.output), output);
|
|
1437
|
-
|
|
1438
|
-
outro("Done.");
|
|
1408
|
+
printSuccess(`Exported to ${args.output}`);
|
|
1439
1409
|
} else process.stdout.write(output);
|
|
1440
1410
|
return;
|
|
1441
1411
|
}
|
|
1442
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
1412
|
+
const { openSqliteDatabase } = await import("./runner-9wjsSZx-.mjs");
|
|
1443
1413
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1444
1414
|
if (!existsSync(dbPath)) {
|
|
1445
1415
|
log.error("No local database found. Run `void dev` first.", errOut);
|
|
@@ -1497,15 +1467,14 @@ async function runExport(root, args, dialect) {
|
|
|
1497
1467
|
const output = parts.join("\n");
|
|
1498
1468
|
if (args.output) {
|
|
1499
1469
|
writeFileSync(join(root, args.output), output);
|
|
1500
|
-
|
|
1501
|
-
outro("Done.");
|
|
1470
|
+
printSuccess(`Exported to ${args.output}`);
|
|
1502
1471
|
} else process.stdout.write(output);
|
|
1503
1472
|
} finally {
|
|
1504
1473
|
db.close();
|
|
1505
1474
|
}
|
|
1506
1475
|
}
|
|
1507
1476
|
async function runSetUrl(root) {
|
|
1508
|
-
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-
|
|
1477
|
+
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-5r-YpMC-.mjs");
|
|
1509
1478
|
const dialect = getDialect(readVoidConfig(root));
|
|
1510
1479
|
if (dialect === "sqlite") {
|
|
1511
1480
|
log.error("db: This command is only for PostgreSQL and MySQL projects. Set \"database\" to \"pg\" or \"mysql\" in void.config.ts.");
|
|
@@ -1521,7 +1490,7 @@ async function runSetUrl(root) {
|
|
|
1521
1490
|
log.error("No project linked. Run `void deploy` first or link a project.");
|
|
1522
1491
|
process.exit(1);
|
|
1523
1492
|
}
|
|
1524
|
-
const { text: promptText, isCancel: isCancelCheck } = await import("./
|
|
1493
|
+
const { text: promptText, isCancel: isCancelCheck } = await import("./dist-Bx1z6Eva.mjs");
|
|
1525
1494
|
const connectionString = await promptText({
|
|
1526
1495
|
message: `Enter your ${dialect === "mysql" ? "MySQL" : "PostgreSQL"} connection string:`,
|
|
1527
1496
|
placeholder: dialect === "mysql" ? "mysql://user:pass@host:3306/dbname" : "postgresql://user:pass@host:5432/dbname",
|
|
@@ -1533,8 +1502,7 @@ async function runSetUrl(root) {
|
|
|
1533
1502
|
});
|
|
1534
1503
|
if (isCancelCheck(connectionString)) process.exit(0);
|
|
1535
1504
|
await new PlatformClient(token, { root }).setDatabaseUrl(projectConfig.projectId, connectionString);
|
|
1536
|
-
|
|
1537
|
-
outro("Done.");
|
|
1505
|
+
printSuccess("Database URL updated.");
|
|
1538
1506
|
}
|
|
1539
1507
|
function resolveSeedTarget(root, file) {
|
|
1540
1508
|
if (file) return toSeedTarget(root, resolve(root, file), file);
|
|
@@ -1608,7 +1576,7 @@ async function runSeedModule(root, seedPath, dialect) {
|
|
|
1608
1576
|
return;
|
|
1609
1577
|
}
|
|
1610
1578
|
const { drizzle } = await import("drizzle-orm/better-sqlite3");
|
|
1611
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
1579
|
+
const { openSqliteDatabase } = await import("./runner-9wjsSZx-.mjs");
|
|
1612
1580
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1613
1581
|
const sqlite = await openSqliteDatabase(dbPath);
|
|
1614
1582
|
try {
|
|
@@ -1629,7 +1597,7 @@ async function loadSeedFunction(seedPath) {
|
|
|
1629
1597
|
return seed;
|
|
1630
1598
|
}
|
|
1631
1599
|
async function loadSeedSchema(root) {
|
|
1632
|
-
const { discoverSchema } = await import("./discover-
|
|
1600
|
+
const { discoverSchema } = await import("./discover-EDUf6JJw.mjs");
|
|
1633
1601
|
const location = discoverSchema(root, readProjectPaths(root));
|
|
1634
1602
|
if (!location) return {};
|
|
1635
1603
|
if (location.type === "file") {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as removeProjectConfig, r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import {
|
|
4
|
-
import { r as
|
|
5
|
-
import { r as
|
|
6
|
-
import {
|
|
1
|
+
import { a as removeProjectConfig, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-B5_tZLxT.mjs";
|
|
3
|
+
import { L as log, O as cancel, X as text, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
4
|
+
import { d as printSuccess, r as createSpinner, u as note } from "./output-C50ag2r3.mjs";
|
|
5
|
+
import { r as PlatformClient } from "./client-C2Prx_Bi.mjs";
|
|
6
|
+
import { i as resolveProjectBySlug } from "./resolve-project-CP8rZs_p.mjs";
|
|
7
7
|
//#region src/cli/delete.ts
|
|
8
8
|
async function runDeleteCommand(root, slug, options) {
|
|
9
9
|
console.log();
|
|
@@ -54,13 +54,13 @@ async function runDeleteCommand(root, slug, options) {
|
|
|
54
54
|
const s = createSpinner();
|
|
55
55
|
s.start("Deleting project...");
|
|
56
56
|
const result = await client.deleteProject(projectId);
|
|
57
|
-
s.
|
|
57
|
+
s.clear();
|
|
58
58
|
if (result.warnings && result.warnings.length > 0) for (const warning of result.warnings) log.warn(warning);
|
|
59
59
|
if (readProjectConfig(root)?.projectId === projectId) {
|
|
60
60
|
removeProjectConfig(root);
|
|
61
61
|
log.step("Removed local .void/project.json");
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
printSuccess(`Deleted ${projectSlug}`);
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
export { runDeleteCommand };
|