void 0.20.3 → 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-CzwquNiP.mjs → auth-cmd-MkBG2u1f.mjs} +5 -5
- package/dist/{auth-link-ElDTgF7j.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-BpJe6boP.mjs → build-cmd-DsBGwtfs.mjs} +6 -4
- package/dist/{cache-D98YTqeE.mjs → cache-BMw8eMyF.mjs} +6 -4
- package/dist/{cancel-deploy-CPbEQLMG.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 +60 -38
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-DAAivdid.mjs +2 -0
- package/dist/{client-BQBrZoCX.mjs → client-PdAJ-F0t.mjs} +6 -12
- 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-WCQZ_u3m.mjs → connect-BvC9kolB.mjs} +8 -6
- package/dist/{create-project-D0oXA090.mjs → create-project-C9lQhRzj.mjs} +8 -23
- 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-DJ-9qs3S.mjs → db-R7IQgOv5.mjs} +48 -44
- package/dist/{delete-BZ4-WaGm.mjs → delete-CghI_NXn.mjs} +6 -4
- package/dist/deploy-CYPymbtG.mjs +2 -0
- package/dist/{deploy-BAhhcg5q.mjs → deploy-H968Lo4T.mjs} +751 -190
- 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-BxAyhxXN.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-Bj7Cvdwp.mjs → email-_8VmyX7V.mjs} +14 -12
- package/dist/{entry-DU3oDoQ3.mjs → entry-DdRFGK0y.mjs} +2 -2
- package/dist/{env-DP_EErve.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-C-z_xRrQ.mjs → github-cmd-jYjha2LO.mjs} +6 -4
- 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-BGktCXgA.mjs → init-CSXmvxKu.mjs} +49 -50
- package/dist/{link-D2kbqhWb.mjs → link-DxMOALXk.mjs} +7 -5
- package/dist/{list-CvkK_G7k.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-WIjNc77c.mjs → login-CKk5NX4d.mjs} +6 -11
- package/dist/login-Ch9cgWRF.mjs +2 -0
- package/dist/{logs-dLUFCapG.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-CKJ7xIRs.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-CdVWRRJr.mjs → platform-auth-config-Df6yVw-e.mjs} +6 -6
- package/dist/{platform-auth-protection-Drl0qhrn.mjs → platform-auth-protection-Jb0yftay.mjs} +7 -5
- package/dist/{platform-auth-recovery-CmKEWpDo.mjs → platform-auth-recovery-DmRyIfW0.mjs} +6 -5
- package/dist/platform-cmd-C9Vt7m-d.mjs +2 -0
- package/dist/{platform-cmd-5q_k56xS.mjs → platform-cmd-DRxCOTwy.mjs} +8 -5
- package/dist/{platform-domain-4GiDlcqx.mjs → platform-domain-IjiXgrXJ.mjs} +4 -3
- package/dist/{platform-lifecycle-R9xAxvtG.mjs → platform-lifecycle-BquAaU-5.mjs} +208 -37
- package/dist/platform-lifecycle-CuJIZNvA.mjs +2 -0
- package/dist/{platform-management-BfWsXHEW.mjs → platform-management-CCQKGsq4.mjs} +8 -5
- package/dist/platform-management-Cgyed0WY.mjs +2 -0
- package/dist/{platform-recovery-CbK-I1FB.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-CTdmnzvc.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-CGxsQe3_.mjs → project-team-Dapn9HZn.mjs} +6 -4
- package/dist/{project-token-Cirx7uwZ.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-4Nq59hOr.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-Dr7u0Ljx.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/response.mjs +1 -29
- package/dist/runtime/sandbox.mjs +1 -1
- 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-AcPi-FoA.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 +6 -4
- 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 +2 -2
- 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 +15 -15
- 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 +13 -5
- package/skills/void/docs/guide/platform/administration/projects.md +3 -1
- package/skills/void/docs/guide/platform/installation/ci.md +3 -0
- package/skills/void/docs/guide/platform/installation/credentials.md +15 -5
- package/skills/void/docs/guide/platform/installation/prerequisites.md +2 -0
- package/skills/void/docs/guide/platform/installation/setup.md +1 -1
- package/skills/void/docs/guide/remote-dev.md +2 -2
- package/skills/void/docs/guide/sandboxes.md +1 -1
- 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 +21 -4
- package/skills/void/docs/reference/cli.md +32 -23
- package/skills/void/docs/reference/config.md +56 -33
- package/skills/void/docs/reference/structure.md +2 -2
- package/dist/validate-tBBN_dXH.mjs +0 -505
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { a as join } from "../dist-4WkAWhWx.mjs";
|
|
3
|
+
import { j as log } from "../dist-Dn6nn2IU.mjs";
|
|
4
|
+
import { n as getPackageDir } from "../agents-gni4eqBu.mjs";
|
|
5
|
+
import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
6
|
+
import { a as operatorGroups, i as printVoidHeader, n as printGlobalHelp, o as parseOperatorArgs, r as printHelpPage, t as getHelpPath } from "../help-C46mnlUS.mjs";
|
|
7
|
+
import { r as OperatorClientError } from "../operator-client-A0iex2yi.mjs";
|
|
6
8
|
import { readFileSync } from "node:fs";
|
|
7
9
|
import { PLATFORM_LOGIN_KINDS, parsePlatformLoginId } from "@void/platform";
|
|
8
10
|
import { parseArgs } from "node:util";
|
|
@@ -1930,7 +1932,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1930
1932
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
1931
1933
|
try {
|
|
1932
1934
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
1933
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1935
|
+
const { promptSubcommand } = await import("../subcommand-prompt-Gj3VzLIh.mjs");
|
|
1934
1936
|
if (command === "platform" && !sub) log.info("A Void platform lets a team deploy Void apps to a shared Cloudflare account.\nThis command sets up and manages platforms. Join with `void connect <url>`.\nDocs: https://void.cloud/guide/self-hosted-platform");
|
|
1935
1937
|
const result = await promptSubcommand(command, subcommands);
|
|
1936
1938
|
if (!result) process.exit(0);
|
|
@@ -1970,7 +1972,7 @@ if (helpPath) {
|
|
|
1970
1972
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1971
1973
|
process.exit(1);
|
|
1972
1974
|
}
|
|
1973
|
-
import("../deploy-
|
|
1975
|
+
import("../deploy-CYPymbtG.mjs").then(({ runDeploy }) => {
|
|
1974
1976
|
runDeploy(root, {
|
|
1975
1977
|
projectSlug: deployArgs.projectSlug,
|
|
1976
1978
|
dir: deployArgs.dir,
|
|
@@ -1988,24 +1990,24 @@ if (helpPath) {
|
|
|
1988
1990
|
});
|
|
1989
1991
|
} else if (command === "connect") (async () => {
|
|
1990
1992
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1991
|
-
const { runConnectCommand } = await import("../connect-
|
|
1993
|
+
const { runConnectCommand } = await import("../connect-BvC9kolB.mjs");
|
|
1992
1994
|
await runConnectCommand(process.cwd(), parsed);
|
|
1993
1995
|
})().catch((err) => {
|
|
1994
1996
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1995
1997
|
process.exit(1);
|
|
1996
1998
|
});
|
|
1997
|
-
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-
|
|
1998
|
-
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
1999
|
-
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
2000
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
2001
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
2002
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
2003
|
-
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
2004
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
2005
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
2006
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
2007
|
-
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
2008
|
-
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1999
|
+
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-MkBG2u1f.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
2000
|
+
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-C9Vt7m-d.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed)));
|
|
2001
|
+
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-D6PrKn7o.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed)));
|
|
2002
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-2lN--YAX.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
2003
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-wnTel5Yw.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
2004
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CITt8lC-.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
2005
|
+
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-_8VmyX7V.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed)));
|
|
2006
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-R7IQgOv5.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
2007
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-DV4r3nHz.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
2008
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-BBiIZw6g.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
2009
|
+
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-jYjha2LO.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
2010
|
+
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-DsBGwtfs.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
|
|
2009
2011
|
else if (command === "prepare") {
|
|
2010
2012
|
const root = process.cwd();
|
|
2011
2013
|
let prepareArgs;
|
|
@@ -2015,7 +2017,7 @@ else if (command === "prepare") {
|
|
|
2015
2017
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
2016
2018
|
process.exit(1);
|
|
2017
2019
|
}
|
|
2018
|
-
import("../prepare-
|
|
2020
|
+
import("../prepare-CaUxODOU.mjs").then(({ runPrepareCommand }) => {
|
|
2019
2021
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
2020
2022
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
2021
2023
|
process.exit(1);
|
|
@@ -2023,7 +2025,7 @@ else if (command === "prepare") {
|
|
|
2023
2025
|
});
|
|
2024
2026
|
} else if (command === "init") {
|
|
2025
2027
|
const root = process.cwd();
|
|
2026
|
-
import("../init-
|
|
2028
|
+
import("../init-CSXmvxKu.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
2027
2029
|
let initArgs;
|
|
2028
2030
|
try {
|
|
2029
2031
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -2036,6 +2038,17 @@ else if (command === "prepare") {
|
|
|
2036
2038
|
process.exit(1);
|
|
2037
2039
|
});
|
|
2038
2040
|
});
|
|
2041
|
+
} else if (command === "migrate") {
|
|
2042
|
+
if (args.length > 1) {
|
|
2043
|
+
log.error("migrate: This command takes no arguments.");
|
|
2044
|
+
process.exit(1);
|
|
2045
|
+
}
|
|
2046
|
+
import("../migrate-CLty4mZR.mjs").then(({ runMigrateCommand }) => {
|
|
2047
|
+
runMigrateCommand(process.cwd()).catch((err) => {
|
|
2048
|
+
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
2049
|
+
process.exit(1);
|
|
2050
|
+
});
|
|
2051
|
+
});
|
|
2039
2052
|
} else if (command === "-v" || command === "--version") {
|
|
2040
2053
|
const version = JSON.parse(readFileSync(join(getPackageDir(), "package.json"), "utf-8")).version;
|
|
2041
2054
|
console.log(version);
|
|
@@ -2049,6 +2062,10 @@ else if (command === "prepare") {
|
|
|
2049
2062
|
hint: "--agents | --tsconfig | --github | --git | --no-git",
|
|
2050
2063
|
description: "Set up void in a new or existing project"
|
|
2051
2064
|
},
|
|
2065
|
+
{
|
|
2066
|
+
name: "migrate",
|
|
2067
|
+
description: "Migrate legacy project configuration"
|
|
2068
|
+
},
|
|
2052
2069
|
{
|
|
2053
2070
|
name: "connect",
|
|
2054
2071
|
description: "Connect to Cloudflare or a Void platform"
|
|
@@ -2128,41 +2145,46 @@ else if (command === "prepare") {
|
|
|
2128
2145
|
];
|
|
2129
2146
|
(async () => {
|
|
2130
2147
|
printVoidHeader();
|
|
2131
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
2148
|
+
const { promptSubcommand } = await import("../subcommand-prompt-Gj3VzLIh.mjs");
|
|
2132
2149
|
const result = await promptSubcommand("", topLevelCommands);
|
|
2133
2150
|
if (!result) process.exit(0);
|
|
2134
2151
|
const cmd = result.subcommand;
|
|
2135
2152
|
const root = process.cwd();
|
|
2136
2153
|
switch (cmd) {
|
|
2137
2154
|
case "connect": {
|
|
2138
|
-
const { runConnectCommand } = await import("../connect-
|
|
2155
|
+
const { runConnectCommand } = await import("../connect-BvC9kolB.mjs");
|
|
2139
2156
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
2140
2157
|
return;
|
|
2141
2158
|
}
|
|
2142
2159
|
case "init": {
|
|
2143
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
2160
|
+
const { runInitCommand, parseInitArgs } = await import("../init-CSXmvxKu.mjs");
|
|
2144
2161
|
await runInitCommand(root, parseInitArgs([]));
|
|
2145
2162
|
return;
|
|
2146
2163
|
}
|
|
2164
|
+
case "migrate": {
|
|
2165
|
+
const { runMigrateCommand } = await import("../migrate-CLty4mZR.mjs");
|
|
2166
|
+
await runMigrateCommand(root);
|
|
2167
|
+
return;
|
|
2168
|
+
}
|
|
2147
2169
|
case "deploy": {
|
|
2148
|
-
const { runDeploy } = await import("../deploy-
|
|
2170
|
+
const { runDeploy } = await import("../deploy-CYPymbtG.mjs");
|
|
2149
2171
|
await runDeploy(root);
|
|
2150
2172
|
return;
|
|
2151
2173
|
}
|
|
2152
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-
|
|
2153
|
-
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-
|
|
2154
|
-
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-
|
|
2155
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
2156
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
2157
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
2158
|
-
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-
|
|
2159
|
-
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-
|
|
2160
|
-
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-
|
|
2161
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
2162
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
2163
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
2174
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-MkBG2u1f.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
2175
|
+
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-C9Vt7m-d.mjs").then(({ runPlatformCommand }) => runPlatformCommand(r, p)));
|
|
2176
|
+
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-D6PrKn7o.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(r, p)));
|
|
2177
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-2lN--YAX.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
2178
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-wnTel5Yw.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
2179
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-CITt8lC-.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
2180
|
+
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-jYjha2LO.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
2181
|
+
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-DsBGwtfs.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
|
|
2182
|
+
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-_8VmyX7V.mjs").then(({ runEmailCommand }) => runEmailCommand(r, p)));
|
|
2183
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-R7IQgOv5.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
2184
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-DV4r3nHz.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
2185
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-BBiIZw6g.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
2164
2186
|
case "prepare": {
|
|
2165
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
2187
|
+
const { runPrepareCommand } = await import("../prepare-CaUxODOU.mjs");
|
|
2166
2188
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
2167
2189
|
return;
|
|
2168
2190
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as findEnvFile } from "../env-types-
|
|
1
|
+
import { t as findEnvFile } from "../env-types-CWDtqHgw.mjs";
|
|
2
2
|
import { writeSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
@@ -169,7 +169,7 @@ function emitResult(result) {
|
|
|
169
169
|
* facts. The import stays isolated because env.ts is arbitrary project code.
|
|
170
170
|
*/
|
|
171
171
|
async function runFactsChild(root) {
|
|
172
|
-
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-
|
|
172
|
+
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-DIDGM7h4.mjs");
|
|
173
173
|
try {
|
|
174
174
|
emitResult({
|
|
175
175
|
kind: "ok",
|
|
@@ -194,7 +194,7 @@ async function runFactsChild(root) {
|
|
|
194
194
|
* fault → fail closed as a values-free schema error.
|
|
195
195
|
*/
|
|
196
196
|
async function runValidateEmittedChild(root) {
|
|
197
|
-
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-
|
|
197
|
+
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-DIDGM7h4.mjs");
|
|
198
198
|
const emitted = readEmittedWorkerVars(root);
|
|
199
199
|
if (!emitted.ok) {
|
|
200
200
|
emitResult({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as join } from "./dist-BrsS7cai.mjs";
|
|
3
|
-
import { B as ensureCloudflaredToken, U as isCloudflareAccessChallenge, V as ensurePlatformAccessToken, X as normalizePlatformApiUrl, p as getPackageDir } from "./output-B0cfNSx5.mjs";
|
|
1
|
+
import { a as join } from "./dist-4WkAWhWx.mjs";
|
|
4
2
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
5
|
-
import {
|
|
3
|
+
import { a as getApiUrl } from "./auth-B9_D6ygs.mjs";
|
|
4
|
+
import { s as normalizePlatformApiUrl } from "./platform-registry-BJbgZLS1.mjs";
|
|
5
|
+
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, t as ensureCloudflaredToken } from "./cf-access-rAZxzMkL.mjs";
|
|
6
|
+
import { n as getPackageDir } from "./agents-gni4eqBu.mjs";
|
|
6
7
|
import { readFileSync } from "node:fs";
|
|
7
8
|
import { stripVTControlCharacters } from "node:util";
|
|
8
9
|
//#region src/cli/platform-errors.ts
|
|
@@ -82,13 +83,6 @@ function formatPlatformApiError(action, status, body, permission) {
|
|
|
82
83
|
}
|
|
83
84
|
//#endregion
|
|
84
85
|
//#region src/cli/client.ts
|
|
85
|
-
var client_exports = /* @__PURE__ */ __exportAll({
|
|
86
|
-
PlatformApiError: () => PlatformApiError,
|
|
87
|
-
PlatformClient: () => PlatformClient,
|
|
88
|
-
isCliOutdatedError: () => isCliOutdatedError,
|
|
89
|
-
isExpiredTokenError: () => isExpiredTokenError,
|
|
90
|
-
readCliVersion: () => readCliVersion
|
|
91
|
-
});
|
|
92
86
|
/**
|
|
93
87
|
* Current CLI version. Sent as `X-Void-CLI-Version` on every platform
|
|
94
88
|
* request so the platform's CLI-version gate can refuse stale CLIs
|
|
@@ -986,4 +980,4 @@ function sleep(ms) {
|
|
|
986
980
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
987
981
|
}
|
|
988
982
|
//#endregion
|
|
989
|
-
export {
|
|
983
|
+
export { readCliVersion as a, isExpiredTokenError as i, PlatformClient as n, parsePlatformErrorBody as o, isCliOutdatedError as r, platformErrorMessage as s, PlatformApiError as t };
|
|
@@ -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 };
|