void 0.20.2 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/agents-gni4eqBu.mjs +111 -0
- package/dist/auth-3sGB0zJ1.mjs +22 -0
- package/dist/{auth-DPl6kck4.mjs → auth-B9_D6ygs.mjs} +6 -241
- package/dist/auth-CAw7zHqj.mjs +2 -0
- package/dist/auth-client-BWBT8HLp.mjs +6 -0
- package/dist/auth-client-Bawdj38n.d.mts +7 -0
- package/dist/auth-client-react-7GFffu8R.d.mts +7 -0
- package/dist/auth-client-react-CMLwT2xI.mjs +6 -0
- package/dist/auth-client-solid-DyTFL4cq.d.mts +7 -0
- package/dist/auth-client-solid-UoreJWZG.mjs +6 -0
- package/dist/auth-client-svelte-Cv_WvrRk.mjs +6 -0
- package/dist/auth-client-svelte-zetW0KIH.d.mts +7 -0
- package/dist/auth-client-vue-CFk7Xbv3.mjs +6 -0
- package/dist/auth-client-vue-bChShbQP.d.mts +7 -0
- package/dist/{auth-cmd-gniL2fNt.mjs → auth-cmd-MkBG2u1f.mjs} +5 -5
- package/dist/{auth-link-NZdjCmSc.mjs → auth-link-Devmv96E.mjs} +5 -5
- package/dist/{better-auth-shared-DSCeohOK.d.mts → better-auth-shared-BoVwA5Vm.d.mts} +1 -6
- package/dist/{better-auth-shared-CYw1T3k4.mjs → better-auth-shared-syGYYmnY.mjs} +1 -1
- package/dist/{build-cmd-sI18tX_O.mjs → build-cmd-DsBGwtfs.mjs} +6 -4
- package/dist/{cache-IHn5MwBC.mjs → cache-BMw8eMyF.mjs} +6 -4
- package/dist/{cancel-deploy-C5qTOdLi.mjs → cancel-deploy-B3_s9NIN.mjs} +5 -3
- package/dist/cf-access-rAZxzMkL.mjs +181 -0
- package/dist/cf-build-output-CTdlo6Rt.mjs +520 -0
- package/dist/cli/cf-compat.d.mts +1 -0
- package/dist/cli/cf-compat.mjs +934 -0
- package/dist/cli/cli.mjs +61 -38
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-DAAivdid.mjs +2 -0
- package/dist/{client-dHfSJvAN.mjs → client-PdAJ-F0t.mjs} +148 -89
- package/dist/{cloudflare-auth-6M5llVPC.mjs → cloudflare-auth-BCmTc1X_.mjs} +13 -44
- package/dist/{cloudflare-cmd-4RPGN3KB.mjs → cloudflare-cmd-D6PrKn7o.mjs} +4 -7
- package/dist/{cloudflare-connect-t1UU5svD.mjs → cloudflare-connect-DloREDlc.mjs} +6 -6
- package/dist/cloudflare-operations-BHNJVDbN.mjs +2 -0
- package/dist/{cloudflare-operations-BzWnlC1_.mjs → cloudflare-operations-CPEdHYhM.mjs} +37 -39
- package/dist/cloudflare-user-output-Q-k0QoNQ.mjs +20 -0
- package/dist/collect-DAUItMDS.mjs +2 -0
- package/dist/collect-DXHNWHcT.mjs +48 -0
- package/dist/config--T87TD8T.mjs +2 -0
- package/dist/{config-NOG_U1aK.mjs → config-BSe70f4T.mjs} +4 -6
- package/dist/config-DDIFxQYx.mjs +2 -0
- package/dist/{config-uNGuFsI2.mjs → config-Dxr6cTXn.mjs} +22 -37
- package/dist/config-DywxBLQC.d.mts +185 -0
- package/dist/config-entry.d.mts +6 -0
- package/dist/config-entry.mjs +7 -0
- package/dist/config-uP7ZDtVZ.mjs +21 -0
- package/dist/config-write-y3CBI_ux.mjs +60 -0
- package/dist/{connect-Bfk31O_8.mjs → connect-BvC9kolB.mjs} +8 -6
- package/dist/{create-project-Bk9Z0-Jg.mjs → create-project-C9lQhRzj.mjs} +9 -25
- package/dist/create-project-CI-17RVJ.mjs +2 -0
- package/dist/database-provider-Cx525bwX.mjs +6 -0
- package/dist/database-provider.mjs +1 -5
- package/dist/{db-BkRoptAt.mjs → db-R7IQgOv5.mjs} +48 -44
- package/dist/{delete-DouASY9P.mjs → delete-CghI_NXn.mjs} +6 -4
- package/dist/deploy-CYPymbtG.mjs +2 -0
- package/dist/{deploy-DTaWUS1S.mjs → deploy-H968Lo4T.mjs} +765 -197
- package/dist/discover-BBzDZe_o.mjs +2 -0
- package/dist/{discover-xvfrgJeo.mjs → discover-C4O6YxVS.mjs} +3 -8
- package/dist/{dist-BrsS7cai.mjs → dist-4WkAWhWx.mjs} +1 -15
- package/dist/{dist-m40_XgNh.mjs → dist-Bn8Kodjp.mjs} +1 -1
- package/dist/dist-C5fND3R0.mjs +2 -0
- package/dist/dist-D7-nEOXi.mjs +2 -0
- package/dist/{output-B0cfNSx5.mjs → dist-Dn6nn2IU.mjs} +3 -926
- package/dist/{domain-1RhhOVrC.mjs → domain-CITt8lC-.mjs} +7 -5
- package/dist/{route-types-Da-DpyUp.mjs → drizzle-Beb2Am5S.mjs} +1 -280
- package/dist/{email-Ce6SQq-i.mjs → email-C5kaZXzJ.mjs} +2 -2
- package/dist/{email-C-lGh51B.mjs → email-_8VmyX7V.mjs} +14 -12
- package/dist/{entry-DU3oDoQ3.mjs → entry-DdRFGK0y.mjs} +2 -2
- package/dist/{env-DJHsPE7Z.mjs → env-DV4r3nHz.mjs} +9 -7
- package/dist/{env-DBKmK4vc.mjs → env-DX_v-Q-v.mjs} +1 -1
- package/dist/env-Yz4HcvHs.mjs +78 -0
- package/dist/env-helpers--wFmQ_5Q.mjs +136 -0
- package/dist/{env-types-BNPhro-M.mjs → env-types-CWDtqHgw.mjs} +6 -2
- package/dist/{env-validation-CF6KvTRf.mjs → env-validation-BsFEXps5.mjs} +19 -28
- package/dist/env-validation-DIDGM7h4.mjs +2 -0
- package/dist/fetch-CXDChK7B.mjs +18 -0
- package/dist/fetch-_SeGZao9.d.mts +57 -0
- package/dist/fetch-stream-AOByI7Ki.mjs +81 -0
- package/dist/fetch-stream-Bjf0hoZb.d.mts +49 -0
- package/dist/gen-BBiIZw6g.mjs +2 -0
- package/dist/{gen-B_wPnVTK.mjs → gen-CFOEEc-t.mjs} +13 -11
- package/dist/{generate-RTK8_kK1.mjs → generate-C0VY6RVf.mjs} +2 -2
- package/dist/{github-cmd-PW7ZnWTp.mjs → github-cmd-jYjha2LO.mjs} +18 -22
- package/dist/{handler-D1hLsObx.d.mts → handler-BXJTXd02.d.mts} +6 -1
- package/dist/handler-DghKr6dU.mjs +150 -0
- package/dist/head-D_QRR5Yd.mjs +112 -0
- package/dist/head-client-DzmJGN4C.mjs +90 -0
- package/dist/{headers-BAHwgHdW.mjs → headers-B_HBMgi0.mjs} +2 -2
- package/dist/{help-CwOX-zmI.mjs → help-C46mnlUS.mjs} +17 -12
- package/dist/help-CS_nAsWu.mjs +2 -0
- package/dist/index.d.mts +2 -20
- package/dist/index.mjs +116 -60
- package/dist/{init-BWZ7q5Z4.mjs → init-CSXmvxKu.mjs} +49 -50
- package/dist/{link-Rmvu2Wl_.mjs → link-DxMOALXk.mjs} +7 -5
- package/dist/{list-DEE2S6mY.mjs → list-0wQs0oYg.mjs} +7 -5
- package/dist/live-CB1y5IuC.mjs +411 -0
- package/dist/live-CKiJilLr.d.mts +105 -0
- package/dist/local-d1-DzykTWY8.mjs +104 -0
- package/dist/{login-Uvferzmm.mjs → login-CKk5NX4d.mjs} +6 -11
- package/dist/login-Ch9cgWRF.mjs +2 -0
- package/dist/{logs-27FenuiC.mjs → logs-hxWBSoej.mjs} +6 -4
- package/dist/migrate-CLty4mZR.mjs +2 -0
- package/dist/migrate-DcW8F2W8.mjs +285 -0
- package/dist/migration-handler-DM4clYj5.d.mts +51 -0
- package/dist/{neon-DHwd2zvC.mjs → neon-n74ta1Pr.mjs} +1 -1
- package/dist/{node-Ez5KW5rn.mjs → node-Cupyf7-s.mjs} +6 -6
- package/dist/{operator-auth-B3e08unv.mjs → operator-auth-BkVgJqv-.mjs} +2 -2
- package/dist/{operator-client-LUZnlnYk.mjs → operator-client-A0iex2yi.mjs} +2 -1
- package/dist/{operator-cmd-CjOTmAYE.mjs → operator-cmd-BEUYhaHB.mjs} +6 -6
- package/dist/output-urU86XeT.mjs +146 -0
- package/dist/{package-json-CPoWX79C.mjs → package-json-iCbMg5XF.mjs} +1 -1
- package/dist/pages/client.d.mts +5 -2
- package/dist/pages/client.mjs +5 -3
- package/dist/pages/head-client.mjs +1 -89
- package/dist/pages/head.mjs +1 -111
- package/dist/pages/index.d.mts +2 -3
- package/dist/pages/index.mjs +7 -7
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/prefetch.d.mts +2 -30
- package/dist/pages/prefetch.mjs +1 -89
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +3 -3
- package/dist/pages/serialize.d.mts +2 -9
- package/dist/pages/serialize.mjs +1 -13
- package/dist/plan-BEZ8VJW0.mjs +256 -0
- package/dist/plan-DpuOr14e.mjs +2 -0
- package/dist/{platform-auth-config-DrbQXXiW.mjs → platform-auth-config-Df6yVw-e.mjs} +6 -6
- package/dist/{platform-auth-protection-Bhtvp0B_.mjs → platform-auth-protection-Jb0yftay.mjs} +7 -5
- package/dist/{platform-auth-recovery-CeOKGVeJ.mjs → platform-auth-recovery-DmRyIfW0.mjs} +6 -5
- package/dist/platform-cmd-C9Vt7m-d.mjs +2 -0
- package/dist/{platform-cmd-BFhieCdV.mjs → platform-cmd-DRxCOTwy.mjs} +8 -5
- package/dist/{platform-domain-C74PULqV.mjs → platform-domain-IjiXgrXJ.mjs} +4 -3
- package/dist/{platform-lifecycle-BwAIgz-t.mjs → platform-lifecycle-BquAaU-5.mjs} +263 -56
- package/dist/platform-lifecycle-CuJIZNvA.mjs +2 -0
- package/dist/{platform-management-COogu_Se.mjs → platform-management-CCQKGsq4.mjs} +12 -7
- package/dist/platform-management-Cgyed0WY.mjs +2 -0
- package/dist/{platform-recovery-ewqLefp1.mjs → platform-recovery-DS8ih1SW.mjs} +3 -3
- package/dist/platform-registry-BJbgZLS1.mjs +431 -0
- package/dist/{plugin-inference-BDRfZngg.mjs → plugin-inference-DsvtJLll.mjs} +4 -4
- package/dist/prefetch-Bsc_Pb6c.mjs +90 -0
- package/dist/prefetch-Ce6la4EI.d.mts +31 -0
- package/dist/{prepare-blNRQvQl.mjs → prepare-CaUxODOU.mjs} +3 -2
- package/dist/prepare-D4CkM3_v.mjs +2 -0
- package/dist/{prepare-CtDJjoOj.mjs → prepare-pcWcxSCh.mjs} +13 -11
- package/dist/prerender-render-Cf_WDE9W.mjs +111 -0
- package/dist/prerender-render.mjs +1 -110
- package/dist/{preset-lAy0B0BQ.mjs → preset-Dowh9tTt.mjs} +16 -118
- package/dist/project-BEBFDFLz.mjs +2 -0
- package/dist/project-CWNIPoXc.mjs +209 -0
- package/dist/{project-cmd-DmZK9Hxf.mjs → project-cmd-2lN--YAX.mjs} +18 -16
- package/dist/{project-paths-SK8nMHPp.mjs → project-paths-CKQ-Q5JS.mjs} +47 -14
- package/dist/project-slug-23TpquG4.mjs +8 -0
- package/dist/project-slug-DofjTFd-.mjs +2 -0
- package/dist/{project-team-D8jOJMUJ.mjs → project-team-Dapn9HZn.mjs} +9 -5
- package/dist/{project-token-DA34bf-C.mjs → project-token-C90v9SJK.mjs} +6 -4
- package/dist/{project-tsconfig-Ql2XsSQp.mjs → project-tsconfig-CwfqUnVp.mjs} +2 -2
- package/dist/{protocol-C-pqYJjE.d.mts → protocol-ZH3jP4a7.d.mts} +1 -1
- package/dist/providers-BNKRacMr.d.mts +7 -0
- package/dist/provision-CNgEBkVA.mjs +3 -0
- package/dist/{provision-CSJOjjQk.mjs → provision-Cck2m3jJ.mjs} +11 -25
- package/dist/queues-BWKt1Xo4.d.mts +7 -0
- package/dist/{requests-CUExwGQQ.mjs → requests-CzX46I0i.mjs} +5 -3
- package/dist/resolve-project-BTotl8Nn.mjs +2 -0
- package/dist/{resolve-project--Vxawf7z.mjs → resolve-project-Xvis70DG.mjs} +2 -8
- package/dist/response-Tn7rU0MV.mjs +30 -0
- package/dist/{rollback-CDNGU1gr.mjs → rollback-BEeyc73H.mjs} +6 -4
- package/dist/{rolldown-runtime-rQ84J-ij.mjs → rolldown-runtime-DXIUcv95.mjs} +1 -10
- package/dist/route-types-Id82-veQ.mjs +280 -0
- package/dist/{local-d1-D2I6Ox5F.mjs → runner-BGVsGgkb.mjs} +6 -114
- package/dist/runner-CQs_cDSG.mjs +2 -0
- package/dist/runner-mysql-1o47achK.mjs +2 -0
- package/dist/{runner-mysql-7BPUNGmL.mjs → runner-mysql-BhwMk2Bm.mjs} +2 -9
- package/dist/{runner-pg-BkEza-dX.mjs → runner-pg-CJ_JeGF6.mjs} +2 -9
- package/dist/runner-pg-D7z01mQS.mjs +2 -0
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth-client-react.d.mts +2 -6
- package/dist/runtime/auth-client-react.mjs +1 -5
- package/dist/runtime/auth-client-solid.d.mts +2 -6
- package/dist/runtime/auth-client-solid.mjs +1 -5
- package/dist/runtime/auth-client-svelte.d.mts +2 -6
- package/dist/runtime/auth-client-svelte.mjs +1 -5
- package/dist/runtime/auth-client-vue.d.mts +2 -6
- package/dist/runtime/auth-client-vue.mjs +1 -5
- package/dist/runtime/auth-client.d.mts +2 -6
- package/dist/runtime/auth-client.mjs +1 -5
- package/dist/runtime/auth.mjs +1 -21
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +3 -3
- package/dist/runtime/client-react.mjs +3 -3
- package/dist/runtime/client-solid.d.mts +3 -3
- package/dist/runtime/client-solid.mjs +3 -3
- package/dist/runtime/client-svelte.d.mts +3 -3
- package/dist/runtime/client-svelte.mjs +3 -3
- package/dist/runtime/client-vue.d.mts +3 -3
- package/dist/runtime/client-vue.mjs +3 -3
- package/dist/runtime/client.d.mts +3 -3
- package/dist/runtime/client.mjs +3 -3
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-helpers.mjs +1 -135
- package/dist/runtime/env-public-client.mjs +1 -1
- package/dist/runtime/env-public.mjs +2 -2
- package/dist/runtime/env.mjs +1 -77
- package/dist/runtime/fetch-stream.d.mts +2 -49
- package/dist/runtime/fetch-stream.mjs +2 -80
- package/dist/runtime/fetch.d.mts +2 -57
- package/dist/runtime/fetch.mjs +2 -17
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -149
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +2 -2
- package/dist/runtime/live.d.mts +2 -104
- package/dist/runtime/live.mjs +1 -410
- package/dist/runtime/migration-handler-mysql.d.mts +1 -1
- package/dist/runtime/migration-handler-pg.d.mts +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -50
- package/dist/runtime/queues.d.mts +2 -6
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/index.mjs +49 -8
- package/dist/runtime/response.mjs +1 -29
- package/dist/runtime/sandbox.d.mts +4 -56
- package/dist/runtime/sandbox.mjs +82 -221
- package/dist/runtime/sse.mjs +1 -171
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -71
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +2 -2
- package/dist/runtime/ws.d.mts +2 -121
- package/dist/{scan-CpK-57ug.mjs → scan-DJbooZm2.mjs} +3 -3
- package/dist/{scan-BMH4rzlv.mjs → scan-DdDvRCU1.mjs} +8 -26
- package/dist/{secret-Bzzi2e9E.mjs → secret-wnTel5Yw.mjs} +8 -6
- package/dist/serialize-BPvnNQuA.mjs +14 -0
- package/dist/serialize-CfSwWfF2.d.mts +10 -0
- package/dist/{skills-C0RvGjeE.mjs → skills-B-690E7h.mjs} +3 -2
- package/dist/sse-BaC1jXko.mjs +172 -0
- package/dist/{subcommand-prompt-Bmyn5Rlc.mjs → subcommand-prompt-Gj3VzLIh.mjs} +2 -1
- package/dist/sveltekit.d.mts +2 -1
- package/dist/sveltekit.mjs +3 -2
- package/dist/validate-DqJ33oHj.mjs +2 -0
- package/dist/validate-qNhV00PD.mjs +180 -0
- package/dist/validator-BTOu0fB0.mjs +72 -0
- package/dist/{wrangler--imS8n0d.mjs → wrangler-D01qs6VB.mjs} +259 -71
- package/dist/ws-BwcqizuH.d.mts +122 -0
- package/dist/{yarn-pnp-DxSInkzL.mjs → yarn-pnp-CVEc3gE7.mjs} +1 -1
- package/package.json +19 -8
- package/skills/void/SKILL.md +7 -5
- package/skills/void/docs/guide/ai.md +3 -3
- package/skills/void/docs/guide/app-types.md +12 -11
- package/skills/void/docs/guide/auth.md +2 -2
- package/skills/void/docs/guide/database/d1.md +1 -1
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +3 -3
- package/skills/void/docs/guide/deployment.md +16 -16
- package/skills/void/docs/guide/durable-state.md +2 -2
- package/skills/void/docs/guide/edge/headers.md +3 -3
- package/skills/void/docs/guide/edge/prerendering.md +1 -1
- package/skills/void/docs/guide/edge/redirects.md +4 -4
- package/skills/void/docs/guide/edge/revalidation.md +6 -6
- package/skills/void/docs/guide/edge/rewrites.md +28 -27
- package/skills/void/docs/guide/edge/static-assets.md +1 -1
- package/skills/void/docs/guide/email.md +27 -25
- package/skills/void/docs/guide/env-migration.md +1 -1
- package/skills/void/docs/guide/index.md +1 -1
- package/skills/void/docs/guide/pages-routing/head.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +171 -0
- package/skills/void/docs/guide/platform/administration/email.md +121 -0
- package/skills/void/docs/guide/platform/administration/operations.md +97 -0
- package/skills/void/docs/guide/platform/administration/projects.md +56 -0
- package/skills/void/docs/guide/platform/development/local.md +119 -0
- package/skills/void/docs/guide/platform/development/runtime.md +124 -0
- package/skills/void/docs/guide/platform/development/schema-ci.md +95 -0
- package/skills/void/docs/guide/platform/installation/ci.md +58 -0
- package/skills/void/docs/guide/platform/installation/credentials.md +90 -0
- package/skills/void/docs/guide/platform/installation/domains.md +68 -0
- package/skills/void/docs/guide/platform/installation/first-deployment.md +82 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +137 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +88 -0
- package/skills/void/docs/guide/platform/installation/setup.md +169 -0
- package/skills/void/docs/guide/platform/installation/uninstall.md +54 -0
- package/skills/void/docs/guide/platform-administration.md +6 -414
- package/skills/void/docs/guide/platform-development.md +5 -316
- package/skills/void/docs/guide/project-collaboration.md +1 -1
- package/skills/void/docs/guide/remote-dev.md +2 -2
- package/skills/void/docs/guide/sandboxes.md +10 -25
- package/skills/void/docs/guide/self-hosted-platform.md +11 -694
- package/skills/void/docs/guide/ssg.md +1 -1
- package/skills/void/docs/guide/websockets.md +1 -1
- package/skills/void/docs/integrations/cloudflare.md +86 -84
- package/skills/void/docs/integrations/frameworks/analog.md +14 -9
- package/skills/void/docs/integrations/frameworks/astro.md +14 -10
- package/skills/void/docs/integrations/frameworks/nuxt.md +14 -9
- package/skills/void/docs/integrations/frameworks/overview.md +35 -29
- package/skills/void/docs/integrations/frameworks/react-router.md +1 -1
- package/skills/void/docs/integrations/frameworks/sveltekit.md +33 -30
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +1 -1
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -5
- package/skills/void/docs/reference/api.md +55 -38
- package/skills/void/docs/reference/cli.md +60 -34
- package/skills/void/docs/reference/config.md +57 -34
- package/skills/void/docs/reference/resource-inference.md +10 -10
- package/skills/void/docs/reference/structure.md +2 -2
- package/dist/validate-tBBN_dXH.mjs +0 -505
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as resolveWranglerArgv } from "./preset-
|
|
1
|
+
import { j as log } from "./dist-Dn6nn2IU.mjs";
|
|
2
|
+
import { o as resolveWranglerArgv } from "./preset-Dowh9tTt.mjs";
|
|
3
3
|
import { execFile, spawn, spawnSync } from "node:child_process";
|
|
4
4
|
//#region src/cli/cloudflare-auth.ts
|
|
5
5
|
var CloudflareAuthenticationError = class extends Error {
|
|
@@ -40,25 +40,14 @@ async function ensureCloudflareAuthentication(options) {
|
|
|
40
40
|
return session ?? (options.forceLogin ? null : { accounts: [] });
|
|
41
41
|
};
|
|
42
42
|
const existing = options.forceLogin ? null : await readSession();
|
|
43
|
-
if (existing)
|
|
44
|
-
if (existing.authType === "OAuth Token") await enableCloudflareKeyring(run);
|
|
45
|
-
return existing;
|
|
46
|
-
}
|
|
43
|
+
if (existing) return existing;
|
|
47
44
|
if (!(options.interactive ?? (process.stdin.isTTY && process.stdout.isTTY))) throw new CloudflareAuthenticationError("Cloudflare authentication is required. Set CLOUDFLARE_API_TOKEN in CI, or run `void cloudflare login` in an interactive terminal.", "not-authenticated");
|
|
48
|
-
await enableCloudflareKeyring(run);
|
|
49
45
|
announceCloudflareLogin();
|
|
50
|
-
if (!isCleanExit(await run(["login"
|
|
46
|
+
if (!isCleanExit(await run(["login"], false))) throw new CloudflareAuthenticationError("Cloudflare browser sign-in did not complete. Run `void cloudflare login` to try again.", "login");
|
|
51
47
|
const authenticated = await readSession();
|
|
52
48
|
if (!authenticated) throw new CloudflareAuthenticationError("Cloudflare sign-in completed without a usable session. Run `void cloudflare login` to try again.", "not-authenticated");
|
|
53
49
|
return authenticated;
|
|
54
50
|
}
|
|
55
|
-
async function enableCloudflareKeyring(run) {
|
|
56
|
-
if (!isCleanExit(await run([
|
|
57
|
-
"auth",
|
|
58
|
-
"keyring",
|
|
59
|
-
"enable"
|
|
60
|
-
], true))) throw new CloudflareAuthenticationError("Void could not enable secure Cloudflare credential storage in your operating-system keychain.", "keyring");
|
|
61
|
-
}
|
|
62
51
|
/** Credential names only: never include their values in diagnostics. */
|
|
63
52
|
function cloudflareCredentialOverrides(source = process.env) {
|
|
64
53
|
const tokens = ["CLOUDFLARE_API_TOKEN", "CF_API_TOKEN"].filter((key) => Boolean(source[key]));
|
|
@@ -102,11 +91,7 @@ function createBundledCloudflareAuthRunner(root) {
|
|
|
102
91
|
env,
|
|
103
92
|
maxBuffer: 10485760,
|
|
104
93
|
shell: false,
|
|
105
|
-
stdio:
|
|
106
|
-
"inherit",
|
|
107
|
-
"inherit",
|
|
108
|
-
"ignore"
|
|
109
|
-
] : capture ? [
|
|
94
|
+
stdio: cloudflareAuthNeedsTerminal(args) ? "inherit" : capture ? [
|
|
110
95
|
"ignore",
|
|
111
96
|
"pipe",
|
|
112
97
|
"pipe"
|
|
@@ -126,17 +111,13 @@ function createBundledCloudflareAuthRunner(root) {
|
|
|
126
111
|
/** Run a captured auth command without blocking terminal input or exposing credentials. */
|
|
127
112
|
function runCloudflareAuthCommand(root, args, signal) {
|
|
128
113
|
const [command, ...prefix] = resolveWranglerArgv(root);
|
|
129
|
-
if (
|
|
114
|
+
if (cloudflareAuthNeedsTerminal(args)) return new Promise((resolve) => {
|
|
130
115
|
const child = spawn(command, [...prefix, ...args], {
|
|
131
116
|
cwd: root,
|
|
132
117
|
env: cloudflareAuthCommandEnvironment(args),
|
|
133
118
|
shell: false,
|
|
134
119
|
signal,
|
|
135
|
-
stdio:
|
|
136
|
-
"inherit",
|
|
137
|
-
"inherit",
|
|
138
|
-
"ignore"
|
|
139
|
-
],
|
|
120
|
+
stdio: "inherit",
|
|
140
121
|
timeout: 6e5,
|
|
141
122
|
windowsHide: true
|
|
142
123
|
});
|
|
@@ -179,21 +160,11 @@ function runCloudflareAuthCommand(root, args, signal) {
|
|
|
179
160
|
});
|
|
180
161
|
}
|
|
181
162
|
function cloudflareAuthCommandEnvironment(args, source = process.env) {
|
|
182
|
-
|
|
183
|
-
if (args[0] === "login" || args[0] === "logout" || isCloudflareKeyringEnable(args)) env.WRANGLER_LOG = "none";
|
|
184
|
-
return env;
|
|
163
|
+
return cloudflareAuthEnvironment(source);
|
|
185
164
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Wrangler installs its Windows keyring backend only when stdin AND stdout are
|
|
191
|
-
* terminals. Capturing `auth keyring enable` makes first-time setup fail even
|
|
192
|
-
* inside PowerShell. This command only configures storage; it never reads or
|
|
193
|
-
* prints a credential. Keep every other auth command captured.
|
|
194
|
-
*/
|
|
195
|
-
function cloudflareKeyringNeedsTerminal(args) {
|
|
196
|
-
return process.platform === "win32" && process.stdin.isTTY === true && process.stdout.isTTY === true && isCloudflareKeyringEnable(args);
|
|
165
|
+
/** Browser login must display cf's prompts before it completes. */
|
|
166
|
+
function cloudflareAuthNeedsTerminal(args) {
|
|
167
|
+
return args[0] === "login";
|
|
197
168
|
}
|
|
198
169
|
function cloudflareAuthEnvironment(source = process.env) {
|
|
199
170
|
const env = { ...source };
|
|
@@ -203,15 +174,13 @@ function cloudflareAuthEnvironment(source = process.env) {
|
|
|
203
174
|
"WRANGLER_LOG_SANITIZE"
|
|
204
175
|
]);
|
|
205
176
|
for (const key of Object.keys(env)) if (/^VOID_PLATFORM_/i.test(key) || /^(?:DATABASE_URL|CF_ACCESS_CLIENT_ID|CF_ACCESS_CLIENT_SECRET|CF_ACCESS_TOKEN|VOID_ACCESS_CREDENTIALS|VOID_ACCESS_ORIGIN)$/i.test(key) || scrubbedWranglerKeys.has(key.toUpperCase())) delete env[key];
|
|
206
|
-
env.CLOUDFLARE_AUTH_USE_KEYRING = "true";
|
|
207
|
-
env.WRANGLER_LOG_SANITIZE = "true";
|
|
208
177
|
return env;
|
|
209
178
|
}
|
|
210
179
|
function isCleanExit(result) {
|
|
211
180
|
return result.status === 0 && result.signal == null && (result.error == null || result.error === "");
|
|
212
181
|
}
|
|
213
182
|
function announceCloudflareLogin() {
|
|
214
|
-
log.info("Opening Cloudflare login in your browser. Press Ctrl+C to cancel.");
|
|
183
|
+
log.info("Opening Cloudflare login in your browser. Compare the code below with the browser prompt. Press Ctrl+C to cancel.");
|
|
215
184
|
}
|
|
216
185
|
//#endregion
|
|
217
|
-
export { createBundledCloudflareAuthRunner as a,
|
|
186
|
+
export { createBundledCloudflareAuthRunner as a, runCloudflareAuthCommand as c, cloudflareCredentialOverrides as i, announceCloudflareLogin as n, ensureCloudflareAuthentication as o, cloudflareAuthNeedsTerminal as r, parseCloudflareAuthSession as s, CloudflareAuthenticationError as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as basename } from "./dist-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as createBundledCloudflareAuthRunner,
|
|
1
|
+
import { t as basename } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { v as readRootWranglerConfig } from "./wrangler-D01qs6VB.mjs";
|
|
3
|
+
import { j as log } from "./dist-Dn6nn2IU.mjs";
|
|
4
|
+
import { a as createBundledCloudflareAuthRunner, i as cloudflareCredentialOverrides, o as ensureCloudflareAuthentication, s as parseCloudflareAuthSession } from "./cloudflare-auth-BCmTc1X_.mjs";
|
|
5
5
|
//#region src/cli/cloudflare-cmd.ts
|
|
6
6
|
async function runCloudflareCommand(root, args) {
|
|
7
7
|
const runWrangler = createBundledCloudflareAuthRunner(root);
|
|
@@ -18,12 +18,10 @@ async function runCloudflareCommand(root, args) {
|
|
|
18
18
|
const result = await runWrangler(["whoami", "--json"], true);
|
|
19
19
|
const session = result.status === 0 && !result.signal && !result.error ? parseCloudflareAuthSession(result.stdout) : null;
|
|
20
20
|
if (!session) throw new Error("Not signed in to Cloudflare. Run `void cloudflare login`.");
|
|
21
|
-
if (session.authType === "OAuth Token") await enableCloudflareKeyring(runWrangler);
|
|
22
21
|
log.info(formatSession(root, session));
|
|
23
22
|
return;
|
|
24
23
|
}
|
|
25
24
|
case "logout": {
|
|
26
|
-
await enableCloudflareKeyring(runWrangler);
|
|
27
25
|
if ((await runWrangler(["logout"], true)).status !== 0) throw new Error("Could not remove the local Cloudflare browser session.");
|
|
28
26
|
const overrides = cloudflareCredentialOverrides();
|
|
29
27
|
if (overrides.length > 0) log.warn(`Removed the local Cloudflare browser session. Environment credentials remain active: ${overrides.join(", ")}.`);
|
|
@@ -36,7 +34,6 @@ function formatSession(root, session) {
|
|
|
36
34
|
const lines = ["Signed in to Cloudflare."];
|
|
37
35
|
if (session.email) lines.push(`User: ${session.email}`);
|
|
38
36
|
if (session.authType) lines.push(`Authentication: ${session.authType}`);
|
|
39
|
-
if (session.authType === "OAuth Token") lines.push("Credential storage: encrypted file protected by the OS keychain.");
|
|
40
37
|
const overrides = cloudflareCredentialOverrides();
|
|
41
38
|
if (overrides.length > 0) lines.push(`Environment credentials: ${overrides.join(", ")}`);
|
|
42
39
|
lines.push("Accessible accounts:");
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as createBundledCloudflareAuthRunner,
|
|
1
|
+
import { a as join, t as basename } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { i as LATEST_KNOWN_COMPAT_DATE, k as writeProvisionedWranglerConfig, v as readRootWranglerConfig } from "./wrangler-D01qs6VB.mjs";
|
|
3
|
+
import { I as select, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
4
|
+
import { a as createBundledCloudflareAuthRunner, o as ensureCloudflareAuthentication } from "./cloudflare-auth-BCmTc1X_.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
//#region src/cli/cloudflare-connect.ts
|
|
7
7
|
async function connectCloudflare(root, interactive = Boolean(process.stdin.isTTY)) {
|
|
8
8
|
if (process.env.CLOUDFLARE_ENV || process.env.CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH) throw new Error("connect: Named Cloudflare environments and config overrides are not supported.");
|
|
9
|
-
const existingConfigPath = ["wrangler.jsonc", "wrangler.json"].map((name) => join(root, name)).find(existsSync);
|
|
10
9
|
let existingConfig;
|
|
11
10
|
try {
|
|
12
11
|
existingConfig = readRootWranglerConfig(root);
|
|
13
12
|
} catch {
|
|
14
|
-
throw new Error(
|
|
13
|
+
throw new Error("connect: Invalid Cloudflare config. Fix it before connecting to Cloudflare.");
|
|
15
14
|
}
|
|
15
|
+
const existingConfigPath = existingConfig?.configPath;
|
|
16
16
|
const config = existingConfig?.config ?? {};
|
|
17
17
|
const envAccount = process.env.CLOUDFLARE_ACCOUNT_ID || process.env.CF_ACCOUNT_ID;
|
|
18
18
|
const configuredAccount = typeof config.account_id === "string" ? config.account_id : void 0;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { _ as resolveCloudflareD1Context, b as tailCloudflareWorker, c as listCloudflareDomains, g as readCloudflareWorkerStatus, h as readCloudflareD1Migrations, l as listCloudflareSecrets, m as putCloudflareSecret, n as applyCloudflareD1Migrations, o as deleteCloudflareSecret, r as changeCloudflareDomain, s as executeCloudflareD1Sql, t as activateCloudflareExistingVersion, v as resolveCloudflareOperationContext, y as syncCloudflareSecrets } from "./cloudflare-operations-CPEdHYhM.mjs";
|
|
2
|
+
export { activateCloudflareExistingVersion, applyCloudflareD1Migrations, changeCloudflareDomain, deleteCloudflareSecret, executeCloudflareD1Sql, listCloudflareDomains, listCloudflareSecrets, putCloudflareSecret, readCloudflareD1Migrations, readCloudflareWorkerStatus, resolveCloudflareD1Context, resolveCloudflareOperationContext, syncCloudflareSecrets, tailCloudflareWorker };
|
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { A as writeWranglerPublishedTrafficSnapshot, O as updateWranglerCustomDomain, S as readWranglerPublishedTrafficSnapshot, b as readWranglerCustomDomains } from "./wrangler--imS8n0d.mjs";
|
|
1
|
+
import { a as join } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { A as writeWranglerPublishedTrafficSnapshot, L as materializeCloudflareConfig, O as updateWranglerCustomDomain, R as persistCloudflareConfig, S as readWranglerPublishedTrafficSnapshot, b as readWranglerCustomDomains } from "./wrangler-D01qs6VB.mjs";
|
|
4
3
|
import { r as scanWranglerDotenvKeys } from "./dotenv-VQxupEUv.mjs";
|
|
5
|
-
import { o as resolveWranglerArgv } from "./preset-
|
|
6
|
-
import {
|
|
4
|
+
import { o as resolveWranglerArgv } from "./preset-Dowh9tTt.mjs";
|
|
5
|
+
import { g as resolvePinnedApiBaseUrl, h as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware } from "./provision-Cck2m3jJ.mjs";
|
|
7
6
|
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
8
7
|
import { tmpdir } from "node:os";
|
|
9
8
|
import { spawnSync } from "node:child_process";
|
|
10
9
|
import { deployCloudflareVersionTraffic, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, parseRootWranglerConfig, readBindingFieldPresence, readCloudflareTriggerConfig, readWranglerTopLevelString, resolveD1MigrateTarget, stabilizeCloudflareVersionTriggers } from "@void/deploy-cloudflare";
|
|
11
10
|
//#region src/cli/cloudflare-operations.ts
|
|
12
|
-
var cloudflare_operations_exports = /* @__PURE__ */ __exportAll({
|
|
13
|
-
activateCloudflareExistingVersion: () => activateCloudflareExistingVersion,
|
|
14
|
-
applyCloudflareD1Migrations: () => applyCloudflareD1Migrations,
|
|
15
|
-
changeCloudflareDomain: () => changeCloudflareDomain,
|
|
16
|
-
createCloudflareEmptyDomainPublisher: () => createCloudflareEmptyDomainPublisher,
|
|
17
|
-
deleteCloudflareSecret: () => deleteCloudflareSecret,
|
|
18
|
-
executeCloudflareD1Sql: () => executeCloudflareD1Sql,
|
|
19
|
-
listCloudflareDomains: () => listCloudflareDomains,
|
|
20
|
-
listCloudflareSecrets: () => listCloudflareSecrets,
|
|
21
|
-
parseActiveVersionId: () => parseActiveVersionId,
|
|
22
|
-
parseCloudflareDeployedVersionIds: () => parseCloudflareDeployedVersionIds,
|
|
23
|
-
parseCloudflareVersions: () => parseCloudflareVersions,
|
|
24
|
-
publishEmptyCloudflareCustomDomainSet: () => publishEmptyCloudflareCustomDomainSet,
|
|
25
|
-
putCloudflareSecret: () => putCloudflareSecret,
|
|
26
|
-
readCloudflareD1Migrations: () => readCloudflareD1Migrations,
|
|
27
|
-
readCloudflareWorkerStatus: () => readCloudflareWorkerStatus,
|
|
28
|
-
resolveCloudflareD1Context: () => resolveCloudflareD1Context,
|
|
29
|
-
resolveCloudflareOperationContext: () => resolveCloudflareOperationContext,
|
|
30
|
-
syncCloudflareSecrets: () => syncCloudflareSecrets,
|
|
31
|
-
tailCloudflareWorker: () => tailCloudflareWorker
|
|
32
|
-
});
|
|
33
11
|
function resolveCloudflareOperationContext(root, runner) {
|
|
34
12
|
const configPath = discoverRootWranglerConfig(root);
|
|
35
13
|
if (!existsSync(configPath)) throw new Error(`No Cloudflare config found at "${configPath}". Run \`void init\` first.`);
|
|
@@ -39,7 +17,7 @@ function resolveCloudflareOperationContext(root, runner) {
|
|
|
39
17
|
const workerName = readWranglerTopLevelString(config, "name");
|
|
40
18
|
if (!workerName) throw new Error(`Cloudflare config "${configPath}" has no worker name. Run \`void init\` first.`);
|
|
41
19
|
const accountId = readWranglerTopLevelString(config, "account_id") ?? (process.env.CLOUDFLARE_ACCOUNT_ID?.trim() || void 0);
|
|
42
|
-
if (!accountId) throw new Error("No Cloudflare account is pinned. Set account_id in
|
|
20
|
+
if (!accountId) throw new Error("No Cloudflare account is pinned. Set cloudflare.account_id in void.config.ts or CLOUDFLARE_ACCOUNT_ID.");
|
|
43
21
|
const apiBaseUrl = resolvePinnedApiBaseUrl(process.env, readWranglerTopLevelString(config, "compliance_region"));
|
|
44
22
|
return {
|
|
45
23
|
accountId,
|
|
@@ -262,7 +240,8 @@ async function activateCloudflareExistingVersion(context, target, current) {
|
|
|
262
240
|
targetTriggerConfig,
|
|
263
241
|
previousTriggerConfig: currentTriggerConfig,
|
|
264
242
|
knownTriggerConfigs,
|
|
265
|
-
publishEmptyCustomDomains: createCloudflareEmptyDomainPublisher(context)
|
|
243
|
+
publishEmptyCustomDomains: createCloudflareEmptyDomainPublisher(context),
|
|
244
|
+
publishEmptyCrons: createCloudflareEmptyCronPublisher(context)
|
|
266
245
|
});
|
|
267
246
|
if (triggers.ok && triggers.targetOwnsTraffic) {
|
|
268
247
|
writeWranglerPublishedTrafficSnapshot(context.configPath, {
|
|
@@ -286,7 +265,8 @@ async function activateCloudflareExistingVersion(context, target, current) {
|
|
|
286
265
|
targetTriggerConfig,
|
|
287
266
|
previousTriggerConfig: currentTriggerConfig,
|
|
288
267
|
knownTriggerConfigs,
|
|
289
|
-
publishEmptyCustomDomains: createCloudflareEmptyDomainPublisher(context)
|
|
268
|
+
publishEmptyCustomDomains: createCloudflareEmptyDomainPublisher(context),
|
|
269
|
+
publishEmptyCrons: createCloudflareEmptyCronPublisher(context)
|
|
290
270
|
});
|
|
291
271
|
throw new Error(repair.ok ? `Cloudflare rollback to ${target.id} was superseded by ${repair.activeVersionId}; Void restored the active version's triggers. Refresh deployment status before retrying.` : `Cloudflare rollback to ${target.id} was superseded by ${ownerBeforeCompensation ?? "an unknown version"}, but Void could not restore the active triggers (${repair.reason}). Inspect the Worker immediately.`);
|
|
292
272
|
}
|
|
@@ -309,7 +289,8 @@ async function activateCloudflareExistingVersion(context, target, current) {
|
|
|
309
289
|
targetTriggerConfig: currentTriggerConfig,
|
|
310
290
|
previousTriggerConfig: targetTriggerConfig,
|
|
311
291
|
knownTriggerConfigs,
|
|
312
|
-
publishEmptyCustomDomains: createCloudflareEmptyDomainPublisher(context)
|
|
292
|
+
publishEmptyCustomDomains: createCloudflareEmptyDomainPublisher(context),
|
|
293
|
+
publishEmptyCrons: createCloudflareEmptyCronPublisher(context)
|
|
313
294
|
});
|
|
314
295
|
if (!restoredTriggers.ok) recoveryFailure = "previous trigger synchronization failed";
|
|
315
296
|
else if (!restoredTriggers.targetOwnsTraffic) recoveryFailure = `recovery was superseded by ${restoredTriggers.activeVersionId}`;
|
|
@@ -357,7 +338,8 @@ async function changeCloudflareDomain(root, hostname, action, runner, emptyDomai
|
|
|
357
338
|
if (!update.modified) return update;
|
|
358
339
|
if (update.domains.length === 0 && !emptyDomainPublisher && !resolveCloudflareApiToken()) {
|
|
359
340
|
writeFileSync(before.configPath, original);
|
|
360
|
-
|
|
341
|
+
persistCloudflareConfig(root);
|
|
342
|
+
throw new Error("Deleting the final Cloudflare custom domain requires CLOUDFLARE_API_TOKEN for the empty-domain API update. Export a scoped token with Workers Scripts: Edit permission and retry. No local or remote state changed.");
|
|
361
343
|
}
|
|
362
344
|
const triggerConfigDir = mkdtempSync(join(tmpdir(), "void-domain-triggers-"));
|
|
363
345
|
const triggerConfigPath = join(triggerConfigDir, "wrangler.json");
|
|
@@ -381,6 +363,7 @@ async function changeCloudflareDomain(root, hostname, action, runner, emptyDomai
|
|
|
381
363
|
await deployRoutes();
|
|
382
364
|
} catch (error) {
|
|
383
365
|
writeFileSync(before.configPath, original);
|
|
366
|
+
persistCloudflareConfig(root);
|
|
384
367
|
try {
|
|
385
368
|
await deployRoutes();
|
|
386
369
|
} catch (restoreError) {
|
|
@@ -410,7 +393,7 @@ async function changeCloudflareDomain(root, hostname, action, runner, emptyDomai
|
|
|
410
393
|
*/
|
|
411
394
|
async function publishEmptyCloudflareCustomDomainSet(context) {
|
|
412
395
|
const token = resolveCloudflareApiToken();
|
|
413
|
-
if (!token) throw new Error("CLOUDFLARE_API_TOKEN is required to restore an empty custom-domain set after
|
|
396
|
+
if (!token) throw new Error("CLOUDFLARE_API_TOKEN is required to restore an empty custom-domain set after the Cloudflare trigger update failed.");
|
|
414
397
|
const response = await fetch(`${context.apiBaseUrl}/accounts/${context.accountId}/workers/scripts/${context.workerName}/domains/records`, {
|
|
415
398
|
method: "PUT",
|
|
416
399
|
headers: {
|
|
@@ -454,6 +437,25 @@ function createCloudflareEmptyDomainPublisher(context) {
|
|
|
454
437
|
}
|
|
455
438
|
};
|
|
456
439
|
}
|
|
440
|
+
/** Publish an explicit empty Cron Trigger set through Void's pinned cf transport. */
|
|
441
|
+
function createCloudflareEmptyCronPublisher(context) {
|
|
442
|
+
return async () => {
|
|
443
|
+
try {
|
|
444
|
+
return await run(context, [
|
|
445
|
+
"triggers",
|
|
446
|
+
"clear-crons",
|
|
447
|
+
...targetArgs(context)
|
|
448
|
+
]);
|
|
449
|
+
} catch (error) {
|
|
450
|
+
return {
|
|
451
|
+
status: 1,
|
|
452
|
+
stdout: "",
|
|
453
|
+
stderr: errorMessage(error),
|
|
454
|
+
error: errorMessage(error)
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
457
459
|
function resolveCloudflareApiToken() {
|
|
458
460
|
return process.env.CLOUDFLARE_API_TOKEN || process.env.CF_API_TOKEN || void 0;
|
|
459
461
|
}
|
|
@@ -493,7 +495,7 @@ async function run(context, args, options) {
|
|
|
493
495
|
}));
|
|
494
496
|
if (result.status !== 0 || result.signal != null || result.error !== void 0 && result.error !== null && result.error !== "") {
|
|
495
497
|
const detail = result.stderr.trim() || result.stdout.trim() || result.error || "unknown error";
|
|
496
|
-
throw new Error(`
|
|
498
|
+
throw new Error(`Cloudflare command failed (${args.slice(0, 2).join(" ")}, exit ${result.status}): ${detail}`);
|
|
497
499
|
}
|
|
498
500
|
return result;
|
|
499
501
|
}
|
|
@@ -533,11 +535,7 @@ function createCloudflareOperationRunner(root, accountId, apiBaseUrl) {
|
|
|
533
535
|
};
|
|
534
536
|
}
|
|
535
537
|
function discoverRootWranglerConfig(root) {
|
|
536
|
-
|
|
537
|
-
const path = join(root, name);
|
|
538
|
-
if (existsSync(path)) return path;
|
|
539
|
-
}
|
|
540
|
-
return join(root, "wrangler.jsonc");
|
|
538
|
+
return materializeCloudflareConfig(root);
|
|
541
539
|
}
|
|
542
540
|
function assertNoOperationConfigOverride(root) {
|
|
543
541
|
if (process.env.CLOUDFLARE_ENV?.trim()) throw new Error("CLOUDFLARE_ENV is set. Void Cloudflare operations target the top-level config only.");
|
|
@@ -563,4 +561,4 @@ function errorMessage(error) {
|
|
|
563
561
|
return error instanceof Error ? error.message : String(error);
|
|
564
562
|
}
|
|
565
563
|
//#endregion
|
|
566
|
-
export { createCloudflareEmptyDomainPublisher as n,
|
|
564
|
+
export { resolveCloudflareD1Context as _, createCloudflareEmptyDomainPublisher as a, tailCloudflareWorker as b, listCloudflareDomains as c, parseCloudflareDeployedVersionIds as d, parseCloudflareVersions as f, readCloudflareWorkerStatus as g, readCloudflareD1Migrations as h, createCloudflareEmptyCronPublisher as i, listCloudflareSecrets as l, putCloudflareSecret as m, applyCloudflareD1Migrations as n, deleteCloudflareSecret as o, publishEmptyCloudflareCustomDomainSet as p, changeCloudflareDomain as r, executeCloudflareD1Sql as s, activateCloudflareExistingVersion as t, parseActiveVersionId as u, resolveCloudflareOperationContext as v, syncCloudflareSecrets as y };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region 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
|
+
//#endregion
|
|
20
|
+
export { formatCloudflareUserMessage as t };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { a as join, n as dirname } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
3
|
+
//#region src/migrations/collect.ts
|
|
4
|
+
/**
|
|
5
|
+
* Collect all .sql migration files from the migrations directory,
|
|
6
|
+
* sorted by filename (lexicographic order).
|
|
7
|
+
*/
|
|
8
|
+
function collectMigrations(migrationsDir) {
|
|
9
|
+
if (!existsSync(migrationsDir)) return [];
|
|
10
|
+
return readdirSync(migrationsDir).filter((f) => f.endsWith(".sql") && f !== "seed.sql").sort().map((name) => ({
|
|
11
|
+
name,
|
|
12
|
+
sql: readFileSync(join(migrationsDir, name), "utf-8")
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Read `db/migrations/meta/_journal.json` if it exists. Drizzle maintains
|
|
17
|
+
* this file whenever `drizzle-kit generate` runs; every `.sql` migration
|
|
18
|
+
* under `db/migrations/` should correspond to an entry whose `tag` is the
|
|
19
|
+
* filename without the `.sql` suffix.
|
|
20
|
+
*/
|
|
21
|
+
function readJournal(migrationsDir) {
|
|
22
|
+
const journalPath = join(migrationsDir, "meta", "_journal.json");
|
|
23
|
+
if (!existsSync(journalPath)) return;
|
|
24
|
+
try {
|
|
25
|
+
return JSON.parse(readFileSync(journalPath, "utf-8"));
|
|
26
|
+
} catch (err) {
|
|
27
|
+
throw new Error(`db: Failed to parse db/migrations/meta/_journal.json: '${err.message}'.`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Write `db/migrations/meta/_journal.json` with pretty-printed JSON and a
|
|
32
|
+
* trailing newline, matching the format Drizzle itself emits. Creates the
|
|
33
|
+
* `meta/` directory if it does not yet exist.
|
|
34
|
+
*/
|
|
35
|
+
function writeJournal(migrationsDir, journal) {
|
|
36
|
+
const journalPath = join(migrationsDir, "meta", "_journal.json");
|
|
37
|
+
mkdirSync(dirname(journalPath), { recursive: true });
|
|
38
|
+
writeFileSync(journalPath, JSON.stringify(journal, null, 2) + "\n");
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Drop the `.sql` extension from a migration filename, leaving any other
|
|
42
|
+
* suffix untouched. Used to line filenames up with journal `tag` values.
|
|
43
|
+
*/
|
|
44
|
+
function stripSqlExt(name) {
|
|
45
|
+
return name.endsWith(".sql") ? name.slice(0, -4) : name;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { writeJournal as i, readJournal as n, stripSqlExt as r, collectMigrations as t };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { r as schemaSpecifier, t as discoverSchema } from "./discover-xvfrgJeo.mjs";
|
|
1
|
+
import { a as join, l as relative } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-CKQ-Q5JS.mjs";
|
|
3
|
+
import { n as schemaSpecifier, t as discoverSchema } from "./discover-C4O6YxVS.mjs";
|
|
5
4
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
6
5
|
//#region src/drizzle/config.ts
|
|
7
|
-
var config_exports = /* @__PURE__ */ __exportAll({ writeDrizzleConfig: () => writeDrizzleConfig });
|
|
8
6
|
/**
|
|
9
7
|
* Write a temporary drizzle-kit config to `.void/drizzle.config.json`.
|
|
10
8
|
* All paths are relative to the project root (drizzle-kit resolves
|
|
@@ -31,4 +29,4 @@ function writeDrizzleConfig(root, dbPath, dialect = "sqlite", options) {
|
|
|
31
29
|
return configPath;
|
|
32
30
|
}
|
|
33
31
|
//#endregion
|
|
34
|
-
export { writeDrizzleConfig as
|
|
32
|
+
export { writeDrizzleConfig as t };
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as join } from "./dist-BrsS7cai.mjs";
|
|
3
|
-
import { a as validateSourceDir } from "./project-paths-SK8nMHPp.mjs";
|
|
1
|
+
import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-CKQ-Q5JS.mjs";
|
|
4
2
|
import { i as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-CJlNS3kT.mjs";
|
|
5
3
|
import { a as parseAddress, n as MimeError } from "./mime-D5Nmdzf7.mjs";
|
|
6
|
-
import { readFileSync } from "node:fs";
|
|
7
4
|
//#region src/config.ts
|
|
8
|
-
var config_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
VALID_NOT_FOUND_HANDLING: () => VALID_NOT_FOUND_HANDLING,
|
|
10
|
-
VALID_REDIRECT_STATUSES: () => VALID_REDIRECT_STATUSES,
|
|
11
|
-
assertSingleSplat: () => assertSingleSplat,
|
|
12
|
-
assertUniqueCaptureNames: () => assertUniqueCaptureNames,
|
|
13
|
-
convertFallbacksConfig: () => convertFallbacksConfig,
|
|
14
|
-
convertHeadersConfig: () => convertHeadersConfig,
|
|
15
|
-
convertRedirectsConfig: () => convertRedirectsConfig,
|
|
16
|
-
convertRewritesConfig: () => convertRewritesConfig,
|
|
17
|
-
countSplats: () => countSplats,
|
|
18
|
-
getDatabaseDialect: () => getDatabaseDialect,
|
|
19
|
-
isNodeTarget: () => isNodeTarget,
|
|
20
|
-
isProtocolRelative: () => isProtocolRelative,
|
|
21
|
-
parseHostPrefixedSource: () => parseHostPrefixedSource,
|
|
22
|
-
readConfig: () => readConfig,
|
|
23
|
-
resolveBindingNames: () => resolveBindingNames
|
|
24
|
-
});
|
|
25
5
|
const CONFIG_FILE = "void.json";
|
|
26
6
|
const VALID_TARGETS = /* @__PURE__ */ new Set([
|
|
27
7
|
"cloudflare",
|
|
@@ -220,24 +200,21 @@ const MIGRATION_ERRORS = {
|
|
|
220
200
|
mode: "\"mode\" has been renamed to \"inference.appType\"",
|
|
221
201
|
revalidate: "\"revalidate\" has moved to \"routing.revalidate\""
|
|
222
202
|
};
|
|
223
|
-
/**
|
|
224
|
-
* Read and validate the `void.json` config file from the project root.
|
|
225
|
-
* Returns an empty config object if no file exists.
|
|
226
|
-
*/
|
|
203
|
+
/** Read and validate the project's typed config, with legacy JSON compatibility. */
|
|
227
204
|
function readConfig(root) {
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return {};
|
|
234
|
-
}
|
|
235
|
-
let config;
|
|
205
|
+
const loaded = loadVoidConfig(root);
|
|
206
|
+
return loaded ? validateConfig(loaded.value, loaded.source) : {};
|
|
207
|
+
}
|
|
208
|
+
/** Runtime validation also applies to TypeScript configs, whose types may be bypassed. */
|
|
209
|
+
function validateConfig(config, source = CONFIG_FILE) {
|
|
236
210
|
try {
|
|
237
|
-
|
|
238
|
-
} catch {
|
|
239
|
-
throw new Error(
|
|
211
|
+
return validateConfigObject(config);
|
|
212
|
+
} catch (error) {
|
|
213
|
+
if (source !== CONFIG_FILE && error instanceof Error) throw new Error(error.message.replaceAll(CONFIG_FILE, source), { cause: error });
|
|
214
|
+
throw error;
|
|
240
215
|
}
|
|
216
|
+
}
|
|
217
|
+
function validateConfigObject(config) {
|
|
241
218
|
if (typeof config !== "object" || config === null || Array.isArray(config)) throw new Error(`config: ${CONFIG_FILE} must be a JSON object.`);
|
|
242
219
|
const obj = config;
|
|
243
220
|
for (const [key, message] of Object.entries(MIGRATION_ERRORS)) if (obj[key] !== void 0) throw new Error(`config: ${message} in ${CONFIG_FILE}.`);
|
|
@@ -457,6 +434,9 @@ function readConfig(root) {
|
|
|
457
434
|
}
|
|
458
435
|
}
|
|
459
436
|
}
|
|
437
|
+
if (obj.cloudflare !== void 0) {
|
|
438
|
+
if (typeof obj.cloudflare !== "object" || obj.cloudflare === null || Array.isArray(obj.cloudflare)) throw new Error(`config: "cloudflare" in ${CONFIG_FILE} must be an object.`);
|
|
439
|
+
}
|
|
460
440
|
if (obj.database !== void 0) {
|
|
461
441
|
if (typeof obj.database !== "string" || !VALID_DATABASE_VALUES.has(obj.database)) throw new Error(`config: "database" in ${CONFIG_FILE} must be "pg" or "mysql".`);
|
|
462
442
|
}
|
|
@@ -472,6 +452,11 @@ function readConfig(root) {
|
|
|
472
452
|
for (const key of Object.keys(emailCfg)) if (key !== "from") throw new Error(`config: Unknown key 'email.${key}' in ${CONFIG_FILE}. Valid: from.`);
|
|
473
453
|
if (emailCfg.from !== void 0) parseEmailFrom(emailCfg.from);
|
|
474
454
|
}
|
|
455
|
+
if ("$schema" in obj) {
|
|
456
|
+
const resolved = { ...obj };
|
|
457
|
+
delete resolved.$schema;
|
|
458
|
+
return resolved;
|
|
459
|
+
}
|
|
475
460
|
return obj;
|
|
476
461
|
}
|
|
477
462
|
/**
|
|
@@ -642,4 +627,4 @@ function convertFallbacksConfig(fallbacks) {
|
|
|
642
627
|
return rules.length > 0 ? rules : void 0;
|
|
643
628
|
}
|
|
644
629
|
//#endregion
|
|
645
|
-
export {
|
|
630
|
+
export { convertFallbacksConfig as a, convertRewritesConfig as c, isNodeTarget as d, isProtocolRelative as f, validateConfig as g, resolveBindingNames as h, assertUniqueCaptureNames as i, countSplats as l, readConfig as m, VALID_REDIRECT_STATUSES as n, convertHeadersConfig as o, parseHostPrefixedSource as p, assertSingleSplat as r, convertRedirectsConfig as s, VALID_NOT_FOUND_HANDLING as t, getDatabaseDialect as u };
|