void 0.22.0 → 0.24.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/AGENTS_TEMPLATE.md +1 -1
- package/README.md +5 -1
- package/dist/{account-cmd-CjyxcGkM.mjs → account-cmd-vJhh5lrb.mjs} +5 -5
- package/dist/{scan-ClYmX3sa.mjs → application-analysis-BVsVqc11.mjs} +135 -18
- package/dist/application-routing-B7QEjqSR.mjs +27 -0
- package/dist/{auth-DLNN0D3Z.mjs → auth-CQkSDS50.mjs} +26 -96
- package/dist/auth-DX3JURcX.mjs +2 -0
- package/dist/{auth-link-BLO4ptzo.mjs → auth-link-D75t9wO2.mjs} +5 -5
- package/dist/{auth-router-ZUg9MF_U.mjs → auth-router-ClfhL1J7.mjs} +7 -7
- package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
- package/dist/{build-cmd-BxR5FROK.mjs → build-cmd-zMi1iFnS.mjs} +21 -9
- package/dist/{cache-D0sWhgKI.mjs → cache-ZtQmyxVV.mjs} +5 -5
- package/dist/{cancel-deploy-D4NUqFbi.mjs → cancel-deploy-Box0kkEV.mjs} +5 -5
- package/dist/{cf-access-P0iZnu0q.mjs → cf-access-BGe5sWXF.mjs} +4 -48
- package/dist/{cf-access-DRsQRe6k.mjs → cf-access-TWNzXltp.mjs} +3 -11
- package/dist/{cf-build-output-BJ6yGEIS.mjs → cf-build-output-BPqOT964.mjs} +2 -1
- package/dist/cf-build-output-_0HNWysu.mjs +2 -0
- package/dist/cli/cli.mjs +89 -461
- package/dist/cli/{cf-compat.mjs → cloudflare-operation-process.mjs} +454 -424
- package/dist/cli/env-schema-probe.d.mts +2 -1
- package/dist/cli/env-schema-probe.mjs +4 -4
- package/dist/client-B9UBI03V.mjs +2 -0
- package/dist/{client-BTZ3XkrB.mjs → client-DKAsFA4X.mjs} +161 -24
- package/dist/{cloudflare-auth-DQkqoMYa.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -38
- package/dist/{cloudflare-cmd-BKlfGHAy.mjs → cloudflare-cmd-CmY8dGkd.mjs} +6 -6
- package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
- package/dist/{cloudflare-connect-Ctmrw579.mjs → cloudflare-connect-IiR3ZieC.mjs} +4 -4
- package/dist/{cloudflare-operations-BT6OWFBk.mjs → cloudflare-operations-BCdXSsmo.mjs} +1 -1
- package/dist/{cloudflare-operations-B9tzgjmf.mjs → cloudflare-operations-DzH-A966.mjs} +116 -172
- package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
- package/dist/{config-VavjpDnp.d.mts → config-BMHb8RCj.d.mts} +1 -0
- package/dist/config-C_XRIPx2.mjs +89 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-Dg-WkW-C.mjs → connect-B-usTnlF.mjs} +9 -9
- package/dist/{create-project-l9J7pbtm.mjs → create-project-CYOOAYcn.mjs} +12 -12
- package/dist/{create-project-DdoqwFLF.mjs → create-project-FWbf5Olo.mjs} +1 -1
- package/dist/{db-gp2sCXyN.mjs → db-Ck2eZ2iB.mjs} +26 -26
- package/dist/{delete-TTedbH6B.mjs → delete-sK56qtzZ.mjs} +5 -5
- package/dist/{deploy-CH-o2CaZ.mjs → deploy-gCVaiJbS.mjs} +984 -616
- package/dist/{deploy-B19L2Bra.mjs → deploy-irP5q0-x.mjs} +1 -1
- package/dist/{domain-JRF59P_r.mjs → domain-DFfQE8jg.mjs} +6 -6
- package/dist/{email-Bo6G9LOZ.mjs → email-CdnhUHvJ.mjs} +15 -30
- package/dist/{env-BYOrWQnv.mjs → env-DmGdHi5i.mjs} +8 -8
- package/dist/{env-public-BxU_0yTL.d.mts → env-public-BX_r8HR6.d.mts} +1 -1
- package/dist/{env-types-C2_bIk_b.mjs → env-types-D5kds_OZ.mjs} +1 -1
- package/dist/{env-validation-BB4GkLxn.mjs → env-validation-C_8tPdhs.mjs} +20 -73
- package/dist/{env-validation-BXge7uyK.mjs → env-validation-zZOCcQVZ.mjs} +1 -1
- package/dist/{fetch-CXDChK7B.mjs → fetch-BIZJh7vR.mjs} +2 -2
- package/dist/{fetch-stream-AOByI7Ki.mjs → fetch-stream-IvCYKyQL.mjs} +24 -4
- package/dist/{gen-sCtlCOdA.mjs → gen-CshAkukR.mjs} +4 -4
- package/dist/gen-DvQTWzDU.mjs +2 -0
- package/dist/{github-cmd-0-7PexDq.mjs → github-cmd-DftuEvIt.mjs} +13 -13
- package/dist/{handler-HEcZsaij.d.mts → handler-CZ4nAylQ.d.mts} +1 -1
- package/dist/{headers-DWi2IXWx.mjs → headers-2rKda9Y6.mjs} +1 -1
- package/dist/{help-GKtwl07I.mjs → help-Dotbf6iz.mjs} +236 -750
- package/dist/help-mabuIV98.mjs +2 -0
- package/dist/{inbound-aVHEUhKo.mjs → inbound-fRkqcXaC.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +299 -1517
- package/dist/info-B97bTX9N.mjs +113 -0
- package/dist/{init-FZx3Elvz.mjs → init-BTQEZZGJ.mjs} +61 -27
- package/dist/limits-Bq5LG8Id.d.mts +27 -0
- package/dist/limits-Cjuk2VPm.mjs +68 -0
- package/dist/{link-BrQfb_CU.mjs → link-B46sYH0K.mjs} +6 -6
- package/dist/{list-D44jmIAM.mjs → list-BnPrIsU_.mjs} +6 -6
- package/dist/{live-CKJlvlNp.d.mts → live-Chw1eIMv.d.mts} +1 -1
- package/dist/{local-d1-Bg9OzEEO.mjs → local-d1-2CMnpuW_.mjs} +2 -2
- package/dist/log-vqY3pqwI.mjs +29 -0
- package/dist/{login-CAsAsQ-_.mjs → login-BuiMyUrx.mjs} +8 -8
- package/dist/login-DIy9Sb-U.mjs +2 -0
- package/dist/{logs-BjKvFnVM.mjs → logs-CZG9d-ic.mjs} +10 -11
- package/dist/migrate-BCiJ8w0f.mjs +2 -0
- package/dist/{migrate-BPITvDJN.mjs → migrate-q4_njtaW.mjs} +4 -3
- package/dist/{node-Dt7z256D.mjs → node-BkyRWRx8.mjs} +1 -1
- package/dist/operator-args-B3BTmSoi.mjs +697 -0
- package/dist/{operator-auth-8KnOVXVd.mjs → operator-auth-7erYc6Lt.mjs} +2 -2
- package/dist/{operator-client-DUwumHpQ.mjs → operator-client-CpHjTd0t.mjs} +3 -3
- package/dist/{operator-cmd-BK5CCiT9.mjs → operator-cmd-DGqPJUD3.mjs} +70 -24
- package/dist/{output-Dm_A4Tbv.mjs → output-CbM85T4k.mjs} +18 -10
- package/dist/pages/client.d.mts +34 -2
- package/dist/pages/client.mjs +59 -3
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +2 -2
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -308
- package/dist/{parse-filename-DioPHiR9.mjs → parse-filename-CUbj-1MP.mjs} +35 -1
- package/dist/plan-D1Q5rf-r.mjs +2 -0
- package/dist/plan-NPpwZ_kc.mjs +58 -0
- package/dist/platform-args-3k8X9-H_.mjs +514 -0
- package/dist/platform-args-DdnM6WIf.mjs +2 -0
- package/dist/{platform-auth-config-BlN8xTdD.mjs → platform-auth-config-DDrxUy4m.mjs} +6 -6
- package/dist/{platform-auth-protection-7d5aV2Jg.mjs → platform-auth-protection-BLadnnct.mjs} +8 -8
- package/dist/{platform-auth-recovery-Dxij8ZbR.mjs → platform-auth-recovery-CmCzX2Fl.mjs} +6 -6
- package/dist/{platform-cmd-B3hwKrFK.mjs → platform-cmd-DMDEc9uS.mjs} +29 -8
- package/dist/{platform-cmd-E0FuL212.mjs → platform-cmd-pMTRhvYs.mjs} +1 -1
- package/dist/{platform-domain-D6Xcy9ZX.mjs → platform-domain-Di6EYrQl.mjs} +5 -5
- package/dist/{platform-lifecycle-k0E0xoxx.mjs → platform-lifecycle-BBoNzojY.mjs} +1541 -572
- package/dist/{platform-lifecycle-DMh_qrry.mjs → platform-lifecycle-BFdSi9Qt.mjs} +1 -1
- package/dist/{platform-management-Brz_BDiT.mjs → platform-management-CWOQOWXm.mjs} +10 -7
- package/dist/{platform-management-DOtss0BN.mjs → platform-management-DG47jys8.mjs} +1 -1
- package/dist/platform-plans-config-Vl9BP3H4.mjs +359 -0
- package/dist/{platform-recovery-BvtcXON5.mjs → platform-recovery-BJnQJEtQ.mjs} +4 -4
- package/dist/{platform-registry-QBa4DK32.mjs → platform-registry-DkPPXfp_.mjs} +2 -2
- package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
- package/dist/{prepare-C-6YZyyg.mjs → prepare-CBLT3CHH.mjs} +3 -3
- package/dist/prepare-CnjcTV2s.mjs +2 -0
- package/dist/{prepare-CRhJbVrG.mjs → prepare-DnaKBi--.mjs} +5 -21
- package/dist/{project-C0Fqu05O.mjs → project-DKG5Ra8p.mjs} +15 -82
- package/dist/project-DsblYifa.mjs +2 -0
- package/dist/{project-cmd-BZLCqOqw.mjs → project-cmd-DxnXstAq.mjs} +19 -19
- package/dist/{project-team-BvgM0WoX.mjs → project-team-BmHcaALJ.mjs} +5 -5
- package/dist/{project-token-l5DqK6Az.mjs → project-token-GionZlBI.mjs} +5 -5
- package/dist/{project-zero-trust-v6Mvpp8y.mjs → project-zero-trust-JLCjVQA7.mjs} +5 -5
- package/dist/prompts-2TGE6oXx.mjs +2 -0
- package/dist/prompts-BNUoTiaf.mjs +2044 -0
- package/dist/{protocol-BBa6cstI.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
- package/dist/protocol-U7bfjHmA.mjs +331 -0
- package/dist/{provision-Fr9pRqce.mjs → provision-CVku1JFU.mjs} +1 -1
- package/dist/{provision-C4IGqkBf.mjs → provision-CaoxO_U7.mjs} +90 -199
- package/dist/{requests-DN-BbNiM.mjs → requests-BOjIVAeF.mjs} +5 -5
- package/dist/resource-name-C7LVpcRm.mjs +11 -0
- package/dist/{rollback-D7rzSaZM.mjs → rollback-CwR3pLj3.mjs} +6 -6
- package/dist/route-url-CG7U-cRN.mjs +15 -0
- package/dist/{runner-B8wXwWlo.mjs → runner-CXA9Fh8h.mjs} +1 -1
- package/dist/{runner-p-dMs2UN.mjs → runner-Ol0TNjk6.mjs} +2 -2
- package/dist/runtime/ai.d.mts +12 -8
- package/dist/runtime/ai.mjs +87 -22
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/durable.d.mts +3 -1
- package/dist/runtime/durable.mjs +4 -1
- package/dist/runtime/email/testing.mjs +2 -2
- package/dist/runtime/email.mjs +1 -1
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/kv.mjs +0 -1
- package/dist/runtime/limits.d.mts +2 -0
- package/dist/runtime/limits.mjs +2 -0
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +25 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +62 -42
- package/dist/runtime/remote/index.mjs +2 -2
- package/dist/runtime/route-url.d.mts +4 -0
- package/dist/runtime/route-url.mjs +2 -0
- package/dist/runtime/routing.d.mts +180 -0
- package/dist/runtime/routing.mjs +1082 -0
- package/dist/runtime/sandbox-container.d.mts +1 -1
- package/dist/runtime/sandbox-container.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +3 -3
- package/dist/runtime/sandbox.mjs +75 -45
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +4 -2
- package/dist/runtime/ws-server.mjs +27 -2
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/runtime/ws.mjs +8 -6
- package/dist/{sandbox-qpNBT8a3.d.mts → sandbox-XZAqzFlG.d.mts} +11 -8
- package/dist/{sandbox-container-DdNEBfCc.d.mts → sandbox-container-Bo0eiFKz.d.mts} +2 -1
- package/dist/{sandbox-container-4fdqLnyb.mjs → sandbox-container-C6ItmVuN.mjs} +4 -2
- package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
- package/dist/{secret-BOtOl_cb.mjs → secret-ByWJWBUG.mjs} +7 -7
- package/dist/{skills-D1II1Juz.mjs → skills-C1PlclPt.mjs} +1 -1
- package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
- package/dist/{subcommand-prompt-CY1C4fvl.mjs → subcommand-prompt-klFCfcor.mjs} +40 -32
- package/dist/validate-Dq_L3s0S.mjs +2 -0
- package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
- package/dist/{wrangler-DQF1vKyf.mjs → wrangler-7K-bW_DL.mjs} +8 -239
- package/dist/{ws-BoY7vQML.d.mts → ws-CL1w7GXU.d.mts} +13 -2
- package/package.json +16 -10
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
- package/skills/void/SKILL.md +55 -135
- package/skills/void/docs/guide/ai.md +94 -84
- package/skills/void/docs/guide/app-types.md +3 -32
- package/skills/void/docs/guide/auth.md +12 -116
- package/skills/void/docs/guide/database/d1.md +9 -54
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +5 -26
- package/skills/void/docs/guide/database.md +23 -75
- package/skills/void/docs/guide/deployment.md +48 -112
- package/skills/void/docs/guide/durable-state.md +43 -18
- package/skills/void/docs/guide/edge/headers.md +4 -48
- package/skills/void/docs/guide/edge/prerendering.md +5 -20
- package/skills/void/docs/guide/edge/redirects.md +11 -64
- package/skills/void/docs/guide/edge/revalidation.md +5 -18
- package/skills/void/docs/guide/edge/rewrites.md +56 -284
- package/skills/void/docs/guide/edge/static-assets.md +22 -72
- package/skills/void/docs/guide/email/domains.md +116 -0
- package/skills/void/docs/guide/email/receiving.md +139 -0
- package/skills/void/docs/guide/email/sending.md +231 -0
- package/skills/void/docs/guide/email.md +13 -619
- package/skills/void/docs/guide/env-migration.md +11 -11
- package/skills/void/docs/guide/env-vars.md +9 -29
- package/skills/void/docs/guide/index.md +0 -15
- package/skills/void/docs/guide/jobs.md +3 -18
- package/skills/void/docs/guide/kv.md +5 -11
- package/skills/void/docs/guide/live.md +5 -56
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +78 -125
- package/skills/void/docs/guide/pages-routing/head.md +10 -10
- package/skills/void/docs/guide/pages-routing/islands.md +6 -36
- package/skills/void/docs/guide/pages-routing/layouts.md +6 -128
- package/skills/void/docs/guide/pages-routing/loaders.md +3 -19
- package/skills/void/docs/guide/pages-routing/markdown.md +13 -171
- package/skills/void/docs/guide/pages-routing/overview.md +7 -17
- package/skills/void/docs/guide/pages-routing/view-transitions.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +1 -4
- package/skills/void/docs/guide/platform/administration/email.md +35 -8
- package/skills/void/docs/guide/platform/administration/operations.md +26 -4
- package/skills/void/docs/guide/platform/administration/plans.md +126 -0
- package/skills/void/docs/guide/platform/administration/projects.md +5 -2
- package/skills/void/docs/guide/platform/administration/zero-trust.md +49 -160
- package/skills/void/docs/guide/platform/development/runtime.md +3 -13
- package/skills/void/docs/guide/platform/development/schema-ci.md +0 -58
- package/skills/void/docs/guide/platform/installation/ci.md +1 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +15 -6
- package/skills/void/docs/guide/platform/installation/domains.md +35 -2
- package/skills/void/docs/guide/platform/installation/first-deployment.md +4 -2
- package/skills/void/docs/guide/platform/installation/maintenance.md +15 -1
- package/skills/void/docs/guide/platform/installation/prerequisites.md +24 -18
- package/skills/void/docs/guide/platform/installation/setup.md +88 -14
- package/skills/void/docs/guide/platform-administration.md +1 -0
- package/skills/void/docs/guide/queues.md +7 -9
- package/skills/void/docs/guide/quickstart.md +38 -37
- package/skills/void/docs/guide/remote-dev.md +5 -10
- package/skills/void/docs/guide/sandboxes.md +29 -21
- package/skills/void/docs/guide/server-routing.md +9 -72
- package/skills/void/docs/guide/sse.md +4 -18
- package/skills/void/docs/guide/ssg.md +3 -15
- package/skills/void/docs/guide/ssr.md +14 -62
- package/skills/void/docs/guide/storage.md +9 -4
- package/skills/void/docs/guide/type-safety.md +3 -14
- package/skills/void/docs/guide/typed-fetch.md +3 -7
- package/skills/void/docs/guide/websockets.md +68 -40
- package/skills/void/docs/integrations/agents.md +3 -3
- package/skills/void/docs/integrations/cloudflare.md +85 -316
- package/skills/void/docs/integrations/frameworks/analog.md +5 -64
- package/skills/void/docs/integrations/frameworks/astro.md +4 -73
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -62
- package/skills/void/docs/integrations/frameworks/overview.md +11 -54
- package/skills/void/docs/integrations/frameworks/react-router.md +5 -60
- package/skills/void/docs/integrations/frameworks/sveltekit.md +6 -65
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +4 -62
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -69
- package/skills/void/docs/reference/api/auth.md +156 -0
- package/skills/void/docs/reference/api/client.md +87 -0
- package/skills/void/docs/reference/api/database.md +95 -0
- package/skills/void/docs/reference/api/durable.md +46 -0
- package/skills/void/docs/reference/api/env.md +50 -0
- package/skills/void/docs/reference/api/handlers.md +254 -0
- package/skills/void/docs/reference/api/pages.md +241 -0
- package/skills/void/docs/reference/api/plugin.md +39 -0
- package/skills/void/docs/reference/api/resources.md +109 -0
- package/skills/void/docs/reference/api/rewrites.md +76 -0
- package/skills/void/docs/reference/api/types.md +92 -0
- package/skills/void/docs/reference/api.md +56 -1218
- package/skills/void/docs/reference/cli/auth.md +89 -0
- package/skills/void/docs/reference/cli/database.md +128 -0
- package/skills/void/docs/reference/cli/deploy.md +105 -0
- package/skills/void/docs/reference/cli/domains.md +41 -0
- package/skills/void/docs/reference/cli/email.md +129 -0
- package/skills/void/docs/reference/cli/generate.md +116 -0
- package/skills/void/docs/reference/cli/github.md +189 -0
- package/skills/void/docs/reference/cli/platform-config.md +92 -0
- package/skills/void/docs/reference/cli/platform-email.md +81 -0
- package/skills/void/docs/reference/cli/platform-installation.md +142 -0
- package/skills/void/docs/reference/cli/platform-operations.md +90 -0
- package/skills/void/docs/reference/cli/platform-users.md +89 -0
- package/skills/void/docs/reference/cli/platform-zero-trust.md +59 -0
- package/skills/void/docs/reference/cli/platform.md +70 -0
- package/skills/void/docs/reference/cli/project.md +214 -0
- package/skills/void/docs/reference/cli/secrets.md +76 -0
- package/skills/void/docs/reference/cli/setup.md +70 -0
- package/skills/void/docs/reference/cli.md +32 -1682
- package/skills/void/docs/reference/config.md +12 -18
- package/skills/void/docs/reference/resource-inference.md +3 -58
- package/skills/void/docs/reference/structure.md +14 -41
- package/dist/auth-CZuiVsFh.mjs +0 -2
- package/dist/canonical-json-DuDiiUsQ.mjs +0 -13
- package/dist/client-Czz8o5jP.mjs +0 -2
- package/dist/dist-BuDuKZJv.mjs +0 -2
- package/dist/dist-CTBk70IR.mjs +0 -1310
- package/dist/gen-CNJ62MM7.mjs +0 -2
- package/dist/help-CmZzxUba.mjs +0 -2
- package/dist/log-ChfPKsVd.mjs +0 -26
- package/dist/login-CGcRKEoi.mjs +0 -2
- package/dist/migrate-CYfbKkXh.mjs +0 -2
- package/dist/plan-BEZ8VJW0.mjs +0 -256
- package/dist/plan-DpuOr14e.mjs +0 -2
- package/dist/prepare-Bm3iq-u4.mjs +0 -2
- package/dist/project-BuUwfj6f.mjs +0 -2
- package/dist/validate-EKmJWxmy.mjs +0 -2
- /package/dist/cli/{cf-compat.d.mts → cloudflare-operation-process.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as import_picocolors } from "./output-
|
|
1
|
+
import { $ as wrapTextWithPrefix, G as promptTitle, M as getGuide, V as optionText, b as S_RADIO_ACTIVE, d as S_CHECKBOX_SELECTED, i as S_BAR_END, it as wrapAnsi, j as formatInstructionFooter, n as SELECT_INSTRUCTIONS, r as S_BAR, t as MULTISELECT_INSTRUCTIONS, u as S_CHECKBOX_INACTIVE, w as S_STEP_SUBMIT } from "./prompts-BNUoTiaf.mjs";
|
|
2
|
+
import { c as import_picocolors } from "./output-CbM85T4k.mjs";
|
|
3
3
|
//#region src/cli/subcommand-prompt.ts
|
|
4
4
|
function promptSubcommand(command, subcommands) {
|
|
5
5
|
return new Promise((resolve) => {
|
|
@@ -45,16 +45,25 @@ function promptSubcommand(command, subcommands) {
|
|
|
45
45
|
}
|
|
46
46
|
return `${lines[0]}…`;
|
|
47
47
|
}
|
|
48
|
+
function guidePrefix() {
|
|
49
|
+
return getGuide() ? import_picocolors.default.gray(S_BAR) + " " : " ";
|
|
50
|
+
}
|
|
51
|
+
function renderOption(marker, label, focused, suffix = "") {
|
|
52
|
+
return guidePrefix() + optionText(stdout, marker + " ", label, focused ? (value) => import_picocolors.default.blue(import_picocolors.default.bold(value)) : import_picocolors.default.dim, suffix);
|
|
53
|
+
}
|
|
54
|
+
function instructions(items) {
|
|
55
|
+
return formatInstructionFooter(items, getGuide(), stdout);
|
|
56
|
+
}
|
|
48
57
|
function writeFrame(header, options, footer) {
|
|
49
|
-
const
|
|
58
|
+
const heading = header.trimEnd().split("\n");
|
|
59
|
+
const end = getGuide() ? [import_picocolors.default.gray(S_BAR_END)] : [];
|
|
60
|
+
const count = Math.max(1, Math.min(7, (stdout.rows || 24) - heading.length - footer.length - end.length - 1));
|
|
50
61
|
const start = Math.max(0, Math.min(cursor - Math.floor(count / 2), options.length - count));
|
|
51
62
|
previousFrame = [
|
|
52
|
-
truncate(
|
|
53
|
-
import_picocolors.default.gray(S_BAR),
|
|
63
|
+
...heading.map((line) => truncate(line)),
|
|
54
64
|
...options.slice(start, start + count).map((option) => truncate(option)),
|
|
55
|
-
import_picocolors.default.gray(S_BAR),
|
|
56
65
|
...footer.map((line) => truncate(line)),
|
|
57
|
-
|
|
66
|
+
...end
|
|
58
67
|
].join("\n");
|
|
59
68
|
stdout.write(previousFrame + "\n");
|
|
60
69
|
}
|
|
@@ -69,7 +78,7 @@ function promptSubcommand(command, subcommands) {
|
|
|
69
78
|
const title = command ? `void ${command}` : "void";
|
|
70
79
|
function headerLine() {
|
|
71
80
|
const argPart = selectedArg ? ` ${selectedArg}` : "";
|
|
72
|
-
return `${import_picocolors.default.
|
|
81
|
+
return promptTitle(`${import_picocolors.default.blue(title)} ${import_picocolors.default.dim("·")} ${selectedSub.name}${argPart}`, "active", { output: stdout });
|
|
73
82
|
}
|
|
74
83
|
function renderSelect() {
|
|
75
84
|
const lines = [];
|
|
@@ -78,22 +87,21 @@ function promptSubcommand(command, subcommands) {
|
|
|
78
87
|
for (let i = 0; i < subcommands.length; i++) {
|
|
79
88
|
const sub = subcommands[i];
|
|
80
89
|
const isFocused = i === cursor;
|
|
81
|
-
const radio = isFocused ? import_picocolors.default.
|
|
90
|
+
const radio = isFocused ? import_picocolors.default.blue(S_RADIO_ACTIVE) : import_picocolors.default.dim(" ");
|
|
82
91
|
const name = sub.name.padEnd(maxName);
|
|
83
92
|
let suffix = "";
|
|
84
|
-
if (sub.arg) {
|
|
85
|
-
if (isFocused && input.length > 0) suffix = ` ${import_picocolors.default.
|
|
93
|
+
if (isFocused && sub.arg) {
|
|
94
|
+
if (isFocused && input.length > 0) suffix = ` ${import_picocolors.default.blue(truncate(input, (stdout.columns || 80) - maxName - 9, true))}`;
|
|
86
95
|
else suffix = ` ${import_picocolors.default.dim(sub.arg)}`;
|
|
87
|
-
} else if (sub.hint) suffix = ` ${import_picocolors.default.dim(sub.hint)}`;
|
|
88
|
-
|
|
89
|
-
else lines.push(`${import_picocolors.default.gray(S_BAR)} ${radio} ${import_picocolors.default.dim(name)}${suffix}`);
|
|
96
|
+
} else if (isFocused && sub.hint) suffix = ` ${import_picocolors.default.dim(sub.hint)}`;
|
|
97
|
+
lines.push(renderOption(radio, name, isFocused, suffix));
|
|
90
98
|
}
|
|
91
|
-
const footer = [
|
|
99
|
+
const footer = [guidePrefix() + import_picocolors.default.dim(focused.description), ...instructions(SELECT_INSTRUCTIONS)];
|
|
92
100
|
if (focused.arg) {
|
|
93
|
-
if (focused.arg.startsWith("<")) footer.push(`${
|
|
94
|
-
else footer.push(`${
|
|
101
|
+
if (focused.arg.startsWith("<")) footer.push(`${guidePrefix()}${import_picocolors.default.dim(`Type ${focused.arg}, then press Enter`)}`);
|
|
102
|
+
else footer.push(`${guidePrefix()}${import_picocolors.default.dim(`Type ${focused.arg}, then press Enter, or press Enter to skip`)}`);
|
|
95
103
|
}
|
|
96
|
-
writeFrame(
|
|
104
|
+
writeFrame(promptTitle(import_picocolors.default.blue(title), "active", { output: stdout }), lines, footer);
|
|
97
105
|
}
|
|
98
106
|
function renderFlags() {
|
|
99
107
|
const flags = selectedSub.flags;
|
|
@@ -104,19 +112,19 @@ function promptSubcommand(command, subcommands) {
|
|
|
104
112
|
const flag = flags[i];
|
|
105
113
|
const state = flagStates[i];
|
|
106
114
|
const isFocused = i === cursor;
|
|
107
|
-
const checkbox = state.enabled ? import_picocolors.default.
|
|
115
|
+
const checkbox = state.enabled ? import_picocolors.default.blue(S_CHECKBOX_SELECTED) : isFocused ? import_picocolors.default.blue(S_CHECKBOX_INACTIVE) : import_picocolors.default.dim(S_CHECKBOX_INACTIVE);
|
|
108
116
|
const name = flag.name.padEnd(maxFlag);
|
|
109
117
|
let valueText = "";
|
|
110
118
|
if (flag.arg) {
|
|
111
119
|
if (state.enabled && state.value.length > 0) {
|
|
112
120
|
const value = truncate(state.value, (stdout.columns || 80) - maxFlag - 9, true);
|
|
113
|
-
valueText = ` ${isFocused ? import_picocolors.default.
|
|
121
|
+
valueText = ` ${isFocused ? import_picocolors.default.blue(value) : import_picocolors.default.dim(value)}`;
|
|
114
122
|
} else valueText = ` ${import_picocolors.default.dim(flag.arg)}`;
|
|
115
123
|
}
|
|
116
|
-
|
|
117
|
-
|
|
124
|
+
const pointer = isFocused ? import_picocolors.default.blue(S_RADIO_ACTIVE) : " ";
|
|
125
|
+
lines.push(renderOption(pointer + " " + checkbox, name, isFocused, valueText));
|
|
118
126
|
}
|
|
119
|
-
writeFrame(headerLine(), lines, [
|
|
127
|
+
writeFrame(headerLine(), lines, [guidePrefix() + import_picocolors.default.dim(focused.description), ...instructions(MULTISELECT_INSTRUCTIONS)]);
|
|
120
128
|
}
|
|
121
129
|
function renderMultiSelect() {
|
|
122
130
|
const options = selectedSub.followUp.options;
|
|
@@ -126,21 +134,21 @@ function promptSubcommand(command, subcommands) {
|
|
|
126
134
|
const opt = options[i];
|
|
127
135
|
const selected = multiSelectStates[i];
|
|
128
136
|
const isFocused = i === cursor;
|
|
129
|
-
const checkbox = selected ? import_picocolors.default.
|
|
137
|
+
const checkbox = selected ? import_picocolors.default.blue(S_CHECKBOX_SELECTED) : isFocused ? import_picocolors.default.blue(S_CHECKBOX_INACTIVE) : import_picocolors.default.dim(S_CHECKBOX_INACTIVE);
|
|
130
138
|
const label = opt.label.padEnd(maxLabel);
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
const pointer = isFocused ? import_picocolors.default.blue(S_RADIO_ACTIVE) : " ";
|
|
140
|
+
lines.push(renderOption(pointer + " " + checkbox, label, isFocused));
|
|
133
141
|
}
|
|
134
|
-
writeFrame(headerLine(), lines,
|
|
142
|
+
writeFrame(headerLine(), lines, instructions(MULTISELECT_INSTRUCTIONS));
|
|
135
143
|
}
|
|
136
144
|
function renderRepeatInput() {
|
|
137
145
|
const followUp = selectedSub.followUp;
|
|
138
146
|
const lines = [];
|
|
139
|
-
for (const entry of repeatEntries) lines.push(`${
|
|
140
|
-
if (repeatInput.length > 0) lines.push(`${
|
|
141
|
-
else lines.push(`${
|
|
147
|
+
for (const entry of repeatEntries) lines.push(`${guidePrefix()}${import_picocolors.default.dim(entry)}`);
|
|
148
|
+
if (repeatInput.length > 0) lines.push(`${guidePrefix()}${import_picocolors.default.blue(truncate(repeatInput, (stdout.columns || 80) - 4, true))}`);
|
|
149
|
+
else lines.push(`${guidePrefix()}${import_picocolors.default.dim(followUp.placeholder)}`);
|
|
142
150
|
cursor = lines.length - 1;
|
|
143
|
-
writeFrame(headerLine(), lines, [
|
|
151
|
+
writeFrame(headerLine(), lines, instructions(["Enter add", "Empty input finish"]));
|
|
144
152
|
}
|
|
145
153
|
function cleanup() {
|
|
146
154
|
if (resolved) return;
|
|
@@ -163,7 +171,7 @@ function promptSubcommand(command, subcommands) {
|
|
|
163
171
|
if (typeof value === "string") summary += ` ${value}`;
|
|
164
172
|
}
|
|
165
173
|
if (result.extraArgs && result.extraArgs.length > 0) summary += ` ${result.extraArgs.join(" ")}`;
|
|
166
|
-
stdout.write(`${import_picocolors.default.
|
|
174
|
+
stdout.write(wrapTextWithPrefix(stdout, `${import_picocolors.default.dim(title)} ${import_picocolors.default.dim("·")} ${import_picocolors.default.dim(summary)}`, " ", `${import_picocolors.default.gray(S_STEP_SUBMIT)} `) + "\n");
|
|
167
175
|
}
|
|
168
176
|
resolve(result);
|
|
169
177
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as readJournal, r as stripSqlExt } from "./collect-DiTn9yr6.mjs";
|
|
3
|
-
import { t as DESTRUCTIVE_PRAGMA
|
|
3
|
+
import { t as DESTRUCTIVE_PRAGMA } from "./plan-NPpwZ_kc.mjs";
|
|
4
4
|
import { existsSync, readdirSync } from "node:fs";
|
|
5
|
+
import { tokenizeSql } from "@void/deploy-core";
|
|
5
6
|
//#region src/migrations/validate.ts
|
|
6
7
|
/**
|
|
7
8
|
* Destructive SQL patterns that are rejected unless the migration
|
|
@@ -1,243 +1,12 @@
|
|
|
1
|
-
import { a as join,
|
|
1
|
+
import { a as join, n as dirname, o as normalize, t as basename } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import "./project-paths-GgcMozYz.mjs";
|
|
3
3
|
import { m as readConfig } from "./config-Br_JZD6u.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { a as hasSandboxSqliteMigration, c as resolveSandboxConfig, i as assertSandboxNamespaceConfig, l as sandboxContainerConfig, r as SANDBOX_MIGRATION_TAG } from "./config-C_XRIPx2.mjs";
|
|
5
|
+
import { i as persistCloudflareConfig, r as materializeCloudflareConfig } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
6
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { appendSqliteClassMigration } from "@void/deploy-core";
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
8
9
|
import { SyntaxKind, applyEdits, createScanner, findNodeAtLocation, modify, parse, parseTree } from "jsonc-parser";
|
|
9
|
-
import { isDeepStrictEqual } from "node:util";
|
|
10
|
-
//#region src/cloudflare-config.ts
|
|
11
|
-
const MATERIALIZED_CLOUDFLARE_FILE = ".void-wrangler.jsonc";
|
|
12
|
-
const VOID_LOCK_FILE = "void.lock.json";
|
|
13
|
-
const PREVIEW_POINTER_FILE = "preview-deploy-config.json";
|
|
14
|
-
function isObject(value) {
|
|
15
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16
|
-
}
|
|
17
|
-
function arrayIdentity(value) {
|
|
18
|
-
if (isObject(value)) {
|
|
19
|
-
for (const key of [
|
|
20
|
-
"binding",
|
|
21
|
-
"name",
|
|
22
|
-
"tag",
|
|
23
|
-
"class_name",
|
|
24
|
-
"pattern",
|
|
25
|
-
"route"
|
|
26
|
-
]) if (typeof value[key] === "string") return `${key}:${value[key]}`;
|
|
27
|
-
}
|
|
28
|
-
return JSON.stringify(value) ?? String(value);
|
|
29
|
-
}
|
|
30
|
-
/** Keep authored values authoritative while retaining fields produced by Void. */
|
|
31
|
-
function mergeConfig(previous, resolved, authored) {
|
|
32
|
-
if (isDeepStrictEqual(previous, authored)) return resolved;
|
|
33
|
-
if (Array.isArray(previous) && Array.isArray(resolved) && Array.isArray(authored)) {
|
|
34
|
-
const previousByIdentity = new Map(previous.map((item) => [arrayIdentity(item), item]));
|
|
35
|
-
const resolvedByIdentity = new Map(resolved.map((item) => [arrayIdentity(item), item]));
|
|
36
|
-
const authoredIdentities = new Set(authored.map(arrayIdentity));
|
|
37
|
-
return [...authored.map((item) => {
|
|
38
|
-
const identity = arrayIdentity(item);
|
|
39
|
-
return previousByIdentity.has(identity) && resolvedByIdentity.has(identity) ? mergeConfig(previousByIdentity.get(identity), resolvedByIdentity.get(identity), item) : item;
|
|
40
|
-
}), ...resolved.filter((item) => {
|
|
41
|
-
const identity = arrayIdentity(item);
|
|
42
|
-
return !previousByIdentity.has(identity) && !authoredIdentities.has(identity);
|
|
43
|
-
})];
|
|
44
|
-
}
|
|
45
|
-
if (isObject(previous) && isObject(resolved) && isObject(authored)) {
|
|
46
|
-
const result = {};
|
|
47
|
-
for (const key of /* @__PURE__ */ new Set([
|
|
48
|
-
...Object.keys(previous),
|
|
49
|
-
...Object.keys(resolved),
|
|
50
|
-
...Object.keys(authored)
|
|
51
|
-
])) {
|
|
52
|
-
if (!(key in authored)) {
|
|
53
|
-
if (!(key in previous) && key in resolved) Object.defineProperty(result, key, {
|
|
54
|
-
value: resolved[key],
|
|
55
|
-
enumerable: true,
|
|
56
|
-
writable: true,
|
|
57
|
-
configurable: true
|
|
58
|
-
});
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
const value = mergeConfig(previous[key], resolved[key], authored[key]);
|
|
62
|
-
Object.defineProperty(result, key, {
|
|
63
|
-
value,
|
|
64
|
-
enumerable: true,
|
|
65
|
-
writable: true,
|
|
66
|
-
configurable: true
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return result;
|
|
70
|
-
}
|
|
71
|
-
return authored;
|
|
72
|
-
}
|
|
73
|
-
function parseCloudflareText(text, path) {
|
|
74
|
-
const errors = [];
|
|
75
|
-
const value = parse(text.replace(/^\uFEFF/, ""), errors, { allowTrailingComma: true });
|
|
76
|
-
if (errors.length > 0 || !isObject(value)) throw new Error(`config: ${path} must contain a valid JSON/JSONC object.`);
|
|
77
|
-
return value;
|
|
78
|
-
}
|
|
79
|
-
function readState(root) {
|
|
80
|
-
const path = join(root, VOID_LOCK_FILE);
|
|
81
|
-
if (!existsSync(path)) return;
|
|
82
|
-
let value;
|
|
83
|
-
try {
|
|
84
|
-
value = JSON.parse(readFileSync(path, "utf8"));
|
|
85
|
-
} catch {
|
|
86
|
-
throw new Error(`config: Invalid ${VOID_LOCK_FILE}. Fix or restore it before continuing.`);
|
|
87
|
-
}
|
|
88
|
-
if (!isObject(value) || value.version !== 1 || !isObject(value.source) || !isObject(value.resolved) || typeof value.text !== "string") throw new Error(`config: Invalid ${VOID_LOCK_FILE}. Fix or restore it before continuing.`);
|
|
89
|
-
const state = value;
|
|
90
|
-
if (!isDeepStrictEqual(parseCloudflareText(state.text, "void.lock.json"), state.resolved)) state.text = `${provenance(state.text)}${JSON.stringify(state.resolved, null, 2)}\n`;
|
|
91
|
-
return state;
|
|
92
|
-
}
|
|
93
|
-
function writeAtomic(path, content) {
|
|
94
|
-
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
95
|
-
writeFileSync(temporary, content, { flag: "wx" });
|
|
96
|
-
try {
|
|
97
|
-
renameSync(temporary, path);
|
|
98
|
-
} finally {
|
|
99
|
-
rmSync(temporary, { force: true });
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function writeState(root, state) {
|
|
103
|
-
const path = join(root, VOID_LOCK_FILE);
|
|
104
|
-
const content = `${JSON.stringify(state, null, 2)}\n`;
|
|
105
|
-
if (existsSync(path)) try {
|
|
106
|
-
if (isDeepStrictEqual(JSON.parse(readFileSync(path, "utf8")), state)) return;
|
|
107
|
-
} catch {}
|
|
108
|
-
writeAtomic(path, content);
|
|
109
|
-
}
|
|
110
|
-
/** Keep Vite preview usable without leaving Wrangler's implicit deploy pointer after a build. */
|
|
111
|
-
function stashCloudflareDeployPointer(root) {
|
|
112
|
-
const pointer = join(root, ".wrangler", "deploy", "config.json");
|
|
113
|
-
if (!existsSync(pointer)) return;
|
|
114
|
-
const directory = join(root, ".void");
|
|
115
|
-
mkdirSync(directory, { recursive: true });
|
|
116
|
-
writeAtomic(join(directory, PREVIEW_POINTER_FILE), readFileSync(pointer, "utf8"));
|
|
117
|
-
rmSync(pointer, { force: true });
|
|
118
|
-
}
|
|
119
|
-
function restoreCloudflarePreviewPointer(root) {
|
|
120
|
-
const saved = join(root, ".void", PREVIEW_POINTER_FILE);
|
|
121
|
-
if (!existsSync(saved)) return false;
|
|
122
|
-
const directory = join(root, ".wrangler", "deploy");
|
|
123
|
-
mkdirSync(directory, { recursive: true });
|
|
124
|
-
writeAtomic(join(directory, "config.json"), readFileSync(saved, "utf8"));
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
/** Preserve Void's JSONC provenance comments when authored settings change. */
|
|
128
|
-
function provenance(text) {
|
|
129
|
-
const lines = text.match(/^\s*\/\/ void:(?:managed-queues|published-traffic):v1:[A-Za-z0-9_-]+\s*$/gm);
|
|
130
|
-
return lines ? `${lines.join("\n")}\n` : "";
|
|
131
|
-
}
|
|
132
|
-
/** Resolve the config file passed to Cloudflare tooling. Typed projects use a generated file. */
|
|
133
|
-
function materializeCloudflareConfig(root) {
|
|
134
|
-
if (!existsSync(join(root, "void.config.ts"))) {
|
|
135
|
-
for (const name of ["wrangler.jsonc", "wrangler.json"]) if (existsSync(join(root, name))) return join(root, name);
|
|
136
|
-
return join(root, "wrangler.jsonc");
|
|
137
|
-
}
|
|
138
|
-
if (["wrangler.jsonc", "wrangler.json"].some((name) => existsSync(join(root, name)))) throw new Error("config: Run `void migrate` to move the root Wrangler config into void.config.ts.");
|
|
139
|
-
const authored = readConfig(root).cloudflare ?? {};
|
|
140
|
-
const state = readState(root);
|
|
141
|
-
const resolved = state ? mergeConfig(state.source, state.resolved, authored) : authored;
|
|
142
|
-
const text = state && isDeepStrictEqual(resolved, state.resolved) && isDeepStrictEqual(authored, state.source) ? state.text : `${provenance(state?.text ?? "")}${JSON.stringify(resolved, null, 2)}\n`;
|
|
143
|
-
const path = join(root, MATERIALIZED_CLOUDFLARE_FILE);
|
|
144
|
-
if (!existsSync(path) || readFileSync(path, "utf8") !== text) writeAtomic(path, text);
|
|
145
|
-
if (state) writeState(root, {
|
|
146
|
-
version: 1,
|
|
147
|
-
source: authored,
|
|
148
|
-
resolved,
|
|
149
|
-
text
|
|
150
|
-
});
|
|
151
|
-
return path;
|
|
152
|
-
}
|
|
153
|
-
/** Record Cloudflare settings written by Void so later builds reproduce them. */
|
|
154
|
-
function persistCloudflareConfig(root) {
|
|
155
|
-
if (!existsSync(join(root, "void.config.ts"))) return;
|
|
156
|
-
const path = join(root, MATERIALIZED_CLOUDFLARE_FILE);
|
|
157
|
-
if (!existsSync(path)) throw new Error(`config: Missing generated ${MATERIALIZED_CLOUDFLARE_FILE}.`);
|
|
158
|
-
const text = readFileSync(path, "utf8");
|
|
159
|
-
const resolved = parseCloudflareText(text, path);
|
|
160
|
-
const authored = readConfig(root).cloudflare ?? {};
|
|
161
|
-
if (readState(root) || !isDeepStrictEqual(resolved, authored) || text !== `${JSON.stringify(authored, null, 2)}\n`) writeState(root, {
|
|
162
|
-
version: 1,
|
|
163
|
-
source: authored,
|
|
164
|
-
resolved,
|
|
165
|
-
text
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
/** Seed the checked-in lock from a root Wrangler file during migration. */
|
|
169
|
-
function seedCloudflareConfig(root, source, text) {
|
|
170
|
-
const existing = readState(root);
|
|
171
|
-
if (existing) {
|
|
172
|
-
if (isDeepStrictEqual(existing.source, source) && isDeepStrictEqual(existing.resolved, source)) return;
|
|
173
|
-
throw new Error(`migrate: ${VOID_LOCK_FILE} already exists with different settings. Resolve it before migrating.`);
|
|
174
|
-
}
|
|
175
|
-
if (!isDeepStrictEqual(parseCloudflareText(text, ".void-wrangler.jsonc"), source)) throw new Error("migrate: The Cloudflare config changed during migration. Retry.");
|
|
176
|
-
writeState(root, {
|
|
177
|
-
version: 1,
|
|
178
|
-
source,
|
|
179
|
-
resolved: source,
|
|
180
|
-
text
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
const DEFAULT_SANDBOX_CLASS_NAME = "SandboxV1";
|
|
184
|
-
const SANDBOX_MIGRATION_TAG = "void-sandbox-v2";
|
|
185
|
-
function isSandboxEnabled(config) {
|
|
186
|
-
return config.sandbox !== void 0 && config.sandbox !== false;
|
|
187
|
-
}
|
|
188
|
-
function getDefaultSandboxImage() {
|
|
189
|
-
return fileURLToPath(new URL("../../sandbox.Dockerfile", import.meta.resolve("void/sandbox")));
|
|
190
|
-
}
|
|
191
|
-
function getDefaultSandboxPlatformImage() {
|
|
192
|
-
return "cloudflare/debian-trixie";
|
|
193
|
-
}
|
|
194
|
-
function isLocalSandboxImage(image) {
|
|
195
|
-
const lowerImage = image.toLowerCase();
|
|
196
|
-
return isAbsolute(image) || image.startsWith("./") || image.startsWith("../") || lowerImage === "dockerfile" || lowerImage.includes("dockerfile") || lowerImage.endsWith("/dockerfile") || lowerImage.endsWith("\\dockerfile");
|
|
197
|
-
}
|
|
198
|
-
function requiresSandboxPlatformImage(config) {
|
|
199
|
-
if (typeof config.sandbox !== "object" || config.sandbox === null) return false;
|
|
200
|
-
return typeof config.sandbox.image === "string" && isLocalSandboxImage(config.sandbox.image) && config.sandbox.platformImage === void 0;
|
|
201
|
-
}
|
|
202
|
-
function resolveSandboxConfig(config, root = process.cwd()) {
|
|
203
|
-
const raw = typeof config.sandbox === "object" ? config.sandbox : {};
|
|
204
|
-
const image = raw.image ?? getDefaultSandboxImage();
|
|
205
|
-
const imageBuildContext = raw.imageBuildContext;
|
|
206
|
-
const platformImage = raw.platformImage ?? (raw.image && !isLocalSandboxImage(raw.image) ? raw.image : getDefaultSandboxPlatformImage());
|
|
207
|
-
if (!isLocalSandboxImage(image) && !isSandboxRegistryImage(image)) throw new Error("sandbox.image must be a Dockerfile or a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
|
|
208
|
-
if (platformImage !== getDefaultSandboxPlatformImage() && !isSandboxRegistryImage(platformImage)) throw new Error("sandbox.platformImage must be a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
|
|
209
|
-
return {
|
|
210
|
-
binding: raw.binding ?? "SANDBOX",
|
|
211
|
-
className: raw.className ?? "SandboxV1",
|
|
212
|
-
containerName: raw.containerName ?? "void-sandbox-v1",
|
|
213
|
-
image: resolveSandboxImage(image, root),
|
|
214
|
-
platformImage,
|
|
215
|
-
...imageBuildContext && { imageBuildContext: isAbsolute(imageBuildContext) ? imageBuildContext : join(root, imageBuildContext) },
|
|
216
|
-
...raw.instanceType && { instanceType: raw.instanceType }
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
function resolveSandboxImage(image, root) {
|
|
220
|
-
if (!isLocalSandboxImage(image) || isAbsolute(image)) return image;
|
|
221
|
-
return join(root, image);
|
|
222
|
-
}
|
|
223
|
-
function sandboxContainerConfig(sandbox) {
|
|
224
|
-
return {
|
|
225
|
-
name: sandbox.containerName,
|
|
226
|
-
class_name: sandbox.className,
|
|
227
|
-
scheduling_policy: "durable_object",
|
|
228
|
-
images: { default: isLocalSandboxImage(sandbox.image) ? {
|
|
229
|
-
dockerfile: sandbox.image,
|
|
230
|
-
...sandbox.imageBuildContext && { build_context: sandbox.imageBuildContext }
|
|
231
|
-
} : { image: sandbox.image } }
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
/** Refuse namespace reuse before either uploader can change a live Worker. */
|
|
235
|
-
function assertSandboxNamespaceConfig(config, sandbox) {
|
|
236
|
-
const containers = Array.isArray(config.containers) ? config.containers : [];
|
|
237
|
-
const durable = config.durable_objects;
|
|
238
|
-
if (containers.some((container) => container.class_name === sandbox.className && container.scheduling_policy !== "durable_object") || durable?.bindings?.some((binding) => binding.name === sandbox.binding && binding.class_name !== sandbox.className)) throw new Error("Sandbox SDK 1.0 needs a new Durable Object namespace. Back up existing Sandbox data and deploy to a fresh Worker name with the new Sandbox configuration; remove legacy Sandbox bindings, containers, and migrations from that new Worker configuration. See https://developers.cloudflare.com/containers/guides/migrate-to-durable-object-scheduling-policy/.");
|
|
239
|
-
}
|
|
240
|
-
//#endregion
|
|
241
10
|
//#region src/cli/wrangler.ts
|
|
242
11
|
const COMPAT_DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
243
12
|
/** UTF-8 byte-order mark. Node's utf-8 read preserves a leading one. */
|
|
@@ -620,7 +389,7 @@ function syncWranglerBindings(root, bindings, options) {
|
|
|
620
389
|
modified = true;
|
|
621
390
|
}
|
|
622
391
|
const migrations = Array.isArray(parsed.migrations) ? parsed.migrations : [];
|
|
623
|
-
if (!migrations
|
|
392
|
+
if (!hasSandboxSqliteMigration(migrations, className)) {
|
|
624
393
|
parsed.migrations = [...migrations, {
|
|
625
394
|
tag: SANDBOX_MIGRATION_TAG,
|
|
626
395
|
new_sqlite_classes: [className]
|
|
@@ -1991,4 +1760,4 @@ function canonicalize(value) {
|
|
|
1991
1760
|
return value;
|
|
1992
1761
|
}
|
|
1993
1762
|
//#endregion
|
|
1994
|
-
export {
|
|
1763
|
+
export { writeProvisionedWranglerConfig as A, readWranglerPublishedTrafficSnapshot as C, syncWranglerDurableObjects as D, syncWranglerBindings as E, syncWranglerWebSockets as O, readWranglerManagedQueueCleanupCandidates as S, resolveLiveBindingConfig as T, readExistingLiveBindingConfig as _, LIVE_MIGRATION_TAG as a, readWranglerCompat as b, bindingEntriesForField as c, ensureWranglerCompatibilityDate as d, ensureWranglerNodejsAlsFlag as f, normalizeWranglerCompatibilityFlags as g, nextDurableObjectMigrationTag as h, LATEST_KNOWN_COMPAT_DATE as i, writeWranglerPublishedTrafficSnapshot as j, updateWranglerCustomDomain as k, bindingNamesForField as l, hasDurableObjectSqliteMigration as m, DEFAULT_LIVE_CLASS as n, acknowledgeWranglerManagedQueueRemovals as o, findBindingNameOwner as p, FRIENDLY_BINDING_NAMES as r, assertNoDuplicateMembers as s, DEFAULT_LIVE_BINDING as t, ensureWranglerCompat as u, readProvisionedBindingEntry as v, readWranglerWebSocketTombstones as w, readWranglerCustomDomains as x, readRootWranglerConfig as y };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "./standard-schema-Fo_vCAZh.mjs";
|
|
2
2
|
import { r as AuthUser } from "./auth-DkcFflXV.mjs";
|
|
3
|
-
import { a as CloudEnv } from "./handler-
|
|
3
|
+
import { a as CloudEnv } from "./handler-CZ4nAylQ.mjs";
|
|
4
4
|
import { WebSocketRouteMap } from "void/routes";
|
|
5
5
|
//#region src/runtime/ws.d.ts
|
|
6
6
|
type MaybePromise<T> = T | Promise<T>;
|
|
7
7
|
type ParamsRecord = Record<string, string>;
|
|
8
|
+
type WebSocketInstanceKey = (context: {
|
|
9
|
+
params: ParamsRecord;
|
|
10
|
+
}) => string;
|
|
8
11
|
type WsEntry<P extends keyof WebSocketRouteMap> = WebSocketRouteMap[P];
|
|
9
12
|
type ParamsOf<P extends keyof WebSocketRouteMap> = WsEntry<P> extends {
|
|
10
13
|
params: infer T;
|
|
@@ -45,6 +48,10 @@ type SocketContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
|
45
48
|
};
|
|
46
49
|
type RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
47
50
|
readonly __kind: "room";
|
|
51
|
+
/** Optional persistent resource name. Pin the name reported by `void info` before moving this route. */
|
|
52
|
+
readonly name?: string;
|
|
53
|
+
/** Optional instance key; preserve existing keys when renaming route parameters. */
|
|
54
|
+
readonly key?: WebSocketInstanceKey;
|
|
48
55
|
readonly messages: {
|
|
49
56
|
client: ClientSchema;
|
|
50
57
|
server: ServerSchema;
|
|
@@ -61,6 +68,10 @@ type RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, Se
|
|
|
61
68
|
};
|
|
62
69
|
type SocketDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
63
70
|
readonly __kind: "socket";
|
|
71
|
+
/** Optional persistent resource name. Pin the name reported by `void info` before moving this route. */
|
|
72
|
+
readonly name?: string;
|
|
73
|
+
/** Optional instance key; preserve existing keys when renaming route parameters. */
|
|
74
|
+
readonly key?: WebSocketInstanceKey;
|
|
64
75
|
readonly messages: {
|
|
65
76
|
client: ClientSchema;
|
|
66
77
|
server: ServerSchema;
|
|
@@ -119,4 +130,4 @@ declare class VoidSocket<P extends keyof WebSocketRouteMap & string> {
|
|
|
119
130
|
declare function connect<P extends keyof WebSocketRouteMap & string>(path: HasParams<P> extends false ? P : never): VoidSocket<P>;
|
|
120
131
|
declare function connect<P extends keyof WebSocketRouteMap & string>(path: P, options: ConnectOptions<P>): VoidSocket<P>;
|
|
121
132
|
//#endregion
|
|
122
|
-
export { RoomDefinition as a, VoidSocket as c, WebSocketConnection as d,
|
|
133
|
+
export { RoomDefinition as a, VoidSocket as c, WebSocketConnection as d, WebSocketInstanceKey as f, defineWebSocket as h, RoomController as i, VoidSocketCloseEvent as l, defineRoom as m, ConnectCommonOptions as n, SocketContext as o, connect as p, RoomContext as r, SocketDefinition as s, AnyWebSocketDefinition as t, WebSocketBaseContext as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "void",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/voidzero-dev/void.git",
|
|
@@ -39,10 +39,12 @@
|
|
|
39
39
|
"#self/runtime/live-server": "./dist/runtime/live-server.mjs",
|
|
40
40
|
"#self/runtime/fetch": "./dist/runtime/fetch.mjs",
|
|
41
41
|
"#self/runtime/fetch-stream": "./dist/runtime/fetch-stream.mjs",
|
|
42
|
+
"#self/runtime/route-url": "./dist/runtime/route-url.mjs",
|
|
42
43
|
"#self/runtime/migration-handler": "./dist/runtime/migration-handler.mjs",
|
|
43
44
|
"#self/runtime/migration-handler-pg": "./dist/runtime/migration-handler-pg.mjs",
|
|
44
45
|
"#self/runtime/migration-handler-mysql": "./dist/runtime/migration-handler-mysql.mjs",
|
|
45
|
-
"#self/runtime/ws-server": "./dist/runtime/ws-server.mjs"
|
|
46
|
+
"#self/runtime/ws-server": "./dist/runtime/ws-server.mjs",
|
|
47
|
+
"#self/runtime/routing": "./dist/runtime/routing.mjs"
|
|
46
48
|
},
|
|
47
49
|
"exports": {
|
|
48
50
|
".": {
|
|
@@ -321,6 +323,11 @@
|
|
|
321
323
|
"./_sandbox-container": {
|
|
322
324
|
"types": "./dist/runtime/sandbox-container.d.mts",
|
|
323
325
|
"import": "./dist/runtime/sandbox-container.mjs"
|
|
326
|
+
},
|
|
327
|
+
"./limits": {
|
|
328
|
+
"types": "./dist/runtime/limits.d.mts",
|
|
329
|
+
"import": "./dist/runtime/limits.mjs",
|
|
330
|
+
"require": "./dist/runtime/limits.mjs"
|
|
324
331
|
}
|
|
325
332
|
},
|
|
326
333
|
"dependencies": {
|
|
@@ -332,11 +339,11 @@
|
|
|
332
339
|
"@cloudflare/workers-auth": "0.9.5",
|
|
333
340
|
"@cloudflare/workers-types": "^4.20260702.1",
|
|
334
341
|
"@napi-rs/keyring": "2.1.0",
|
|
335
|
-
"@void/deploy-cloudflare": "0.
|
|
336
|
-
"@void/deploy-core": "0.
|
|
337
|
-
"@void/edge": "0.
|
|
338
|
-
"@void/isr": "0.
|
|
339
|
-
"@void/platform": "0.
|
|
342
|
+
"@void/deploy-cloudflare": "0.24.0",
|
|
343
|
+
"@void/deploy-core": "0.24.0",
|
|
344
|
+
"@void/edge": "0.24.0",
|
|
345
|
+
"@void/isr": "0.24.0",
|
|
346
|
+
"@void/platform": "0.24.0",
|
|
340
347
|
"acorn": "^8.18.0",
|
|
341
348
|
"better-auth": "^1.7.6",
|
|
342
349
|
"better-sqlite3": "^13.0.3",
|
|
@@ -363,13 +370,12 @@
|
|
|
363
370
|
"undici": "8.11.2"
|
|
364
371
|
},
|
|
365
372
|
"devDependencies": {
|
|
366
|
-
"@clack/core": "^1.5.1",
|
|
367
|
-
"@clack/prompts": "^1.8.1",
|
|
368
373
|
"@electric-sql/pglite": "0.5.8",
|
|
369
374
|
"@types/better-sqlite3": "^9.6.0",
|
|
370
375
|
"@types/node": "^26.6.3",
|
|
371
376
|
"@types/pg": "^8.23.1",
|
|
372
377
|
"@types/proper-lockfile": "^4.1.4",
|
|
378
|
+
"@voidzero-dev/vite-plus-prompts": "0.0.0",
|
|
373
379
|
"arktype": "^2.2.5",
|
|
374
380
|
"ci-info": "^4.4.0",
|
|
375
381
|
"estree-walker": "^3.0.3",
|
|
@@ -387,7 +393,7 @@
|
|
|
387
393
|
"zod": "^4.6.5"
|
|
388
394
|
},
|
|
389
395
|
"peerDependencies": {
|
|
390
|
-
"@void/md": "0.
|
|
396
|
+
"@void/md": "0.24.0",
|
|
391
397
|
"arktype": ">=2.0.0",
|
|
392
398
|
"valibot": ">=1.0.0-beta.7",
|
|
393
399
|
"vite": "^8.0.0",
|