void 1.6.2 → 1.7.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/dist/{account-cmd-D903EEWQ.mjs → account-cmd-BfkJ_1PC.mjs} +6 -6
- package/dist/{application-analysis-DlUG-XNT.mjs → application-analysis-OV0CBJ80.mjs} +8 -7
- package/dist/{application-routing-GCBSwXA9.mjs → application-routing-QpyC5G8z.mjs} +2 -1
- package/dist/{auth-CL-p_rqV.mjs → auth-BN0NU9dz.mjs} +1 -1
- package/dist/{auth-Dy8svcqQ.mjs → auth-CCk9Seol.mjs} +2 -2
- package/dist/{auth-CH4PLAX1.d.mts → auth-CZrthGxs.d.mts} +8 -1
- package/dist/{auth-YVjBX5NY.mjs → auth-DyWp-fSo.mjs} +7 -1
- package/dist/{auth-link-g9J7MSmP.mjs → auth-link-CW1Zh6FM.mjs} +6 -6
- package/dist/{auth-router-DMZbG9Qn.mjs → auth-router-CNBKnEZi.mjs} +3 -3
- package/dist/{better-auth-shared-BJyG2mH0.d.mts → better-auth-shared-C-0uZg8-.d.mts} +1 -1
- package/dist/{better-auth-shared-C958aM7W.mjs → better-auth-shared-CdVyCUou.mjs} +1 -1
- package/dist/{build-cmd-DmjbuT6d.mjs → build-cmd-C9qOKW9W.mjs} +5 -5
- package/dist/{cache-2khBO1MR.mjs → cache-DVBBbWQL.mjs} +5 -5
- package/dist/{cancel-deploy-_itbbvY3.mjs → cancel-deploy-COavnjud.mjs} +4 -4
- package/dist/{cf-build-output-B1C8U83u.mjs → cf-build-output-CWNOH-KA.mjs} +2 -1
- package/dist/cf-build-output-DUZnAeZ1.mjs +1 -0
- package/dist/{cf-config-migrate-Dy8MrKgF.mjs → cf-config-migrate-Bb-EdAQq.mjs} +5 -1
- package/dist/cli/cli.mjs +68 -1868
- package/dist/cli/cloudflare-operation-process.mjs +10 -8
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/cli-main-DFteHrJI.mjs +1889 -0
- package/dist/client-BAxLpSKv.mjs +1 -0
- package/dist/{client-CoxPEhJq.mjs → client-BEZmTP6p.mjs} +10 -4
- package/dist/{cloudflare-auth-CuS42-9A.mjs → cloudflare-auth-DGIivpTb.mjs} +1 -1
- package/dist/{cloudflare-cmd-DTF19-j-.mjs → cloudflare-cmd-DJaxC-bc.mjs} +5 -5
- package/dist/{cloudflare-config-Ce8j5S7V.mjs → cloudflare-config-DtOGAbeB.mjs} +2 -2
- package/dist/{cloudflare-connect-BN4dHp8i.mjs → cloudflare-connect-BjpWmglw.mjs} +3 -3
- package/dist/{cloudflare-operations-laxRA8HN.mjs → cloudflare-operations-CZkjFrzH.mjs} +1 -1
- package/dist/{cloudflare-operations-DrZGzQap.mjs → cloudflare-operations-k7wYUv56.mjs} +6 -6
- package/dist/{cloudflare-process-D9aC-jXr.mjs → cloudflare-process-BcPvlMFd.mjs} +2 -2
- package/dist/{config-hL-S-Y9D.mjs → config-5oSQhZNj.mjs} +3 -1
- package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
- package/dist/{config-CNDjO-15.mjs → config-DcqUBGCb.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-DMR0i3Z2.mjs → config-wo2EaH0X.mjs} +1 -1
- package/dist/{connect-DHepM7Xs.mjs → connect-j1F1C_rW.mjs} +7 -7
- package/dist/{create-project-Bq0M8MtO.mjs → create-project-CE3jOmd5.mjs} +5 -5
- package/dist/{create-project-BiMmR5wA.mjs → create-project-DZH3aYGQ.mjs} +1 -1
- package/dist/{db-CqfT6lhV.mjs → db-DyLzzxvM.mjs} +38 -38
- package/dist/{db-types-DRmxBJ2K.mjs → db-types-DdHHUVPy.mjs} +1 -1
- package/dist/{delete-CY4L8fi2.mjs → delete-Dey6YoMA.mjs} +5 -5
- package/dist/{deploy-La_Ly8g_.mjs → deploy-Ccw2D2lw.mjs} +491 -109
- package/dist/deploy-DEZkUS77.mjs +2 -0
- package/dist/{deploy-managed-static-CESLfKHN.mjs → deploy-managed-static-BBVtpuGv.mjs} +16 -16
- package/dist/{deploy-transport-DcI6LXhY.mjs → deploy-transport-Dt0IvSVW.mjs} +2 -2
- package/dist/deploy.mjs +8 -8
- package/dist/{dispatch-DM4Xdd2l.mjs → dispatch-pYaww76u.mjs} +4 -4
- package/dist/{dist-D23AAMxT.mjs → dist-BQdgCVQF.mjs} +1 -1
- package/dist/{dist-eV_Ep60B.mjs → dist-DeTdhbZc.mjs} +1 -1
- package/dist/{domain-BD1KOQL3.mjs → domain-Dh3mG8Vs.mjs} +6 -6
- package/dist/{email-XAspopcj.mjs → email-DKyMjOYM.mjs} +10 -10
- package/dist/{email-cloudflare-RxIQoPc9.mjs → email-cloudflare-CTt2n_W2.mjs} +13 -9
- package/dist/{env-DrYUh55t.mjs → env-DkZzh_Dd.mjs} +7 -7
- package/dist/env-mask-D31Qztl9.mjs +46 -0
- package/dist/{env-validation-Del3C8AY.mjs → env-validation-1snjKtDX.mjs} +4 -4
- package/dist/{env-validation-Bosj7EVg.mjs → env-validation-C8NL3lEH.mjs} +1 -1
- package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
- package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
- package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
- package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
- package/dist/{gen-DSkScMIz.mjs → gen-BZmFOGDQ.mjs} +7 -7
- package/dist/gen-C6iknRdI.mjs +1 -0
- package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-7Oky9qgH.mjs} +6 -6
- package/dist/{handler-DnI_au0K.mjs → handler-C9SnmeW1.mjs} +5 -4
- package/dist/{handler-BR6Tvjkp.d.mts → handler-DjqciiDc.d.mts} +20 -7
- package/dist/{headers--cbz6iZ8.mjs → headers-CimYIfQI.mjs} +1 -1
- package/dist/{help-1OCFDsRr.mjs → help-CNuUb47C.mjs} +7 -3
- package/dist/help-C_cqTByy.mjs +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +154 -109
- package/dist/{info-BpxpsX0B.mjs → info-DwB8IWIx.mjs} +4 -4
- package/dist/{init-DpVXO5S-.mjs → init-CUGSmcED.mjs} +33 -31
- package/dist/{link-DAXOT-G_.mjs → link-BlRTGHan.mjs} +6 -6
- package/dist/{list-BFQ0gcML.mjs → list-iCg7d5Pa.mjs} +7 -7
- package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
- package/dist/{live-0xrcVpyq.d.mts → live-zKGbRT4h.d.mts} +2 -2
- package/dist/{local-d1-CLVPP6v7.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
- package/dist/login-C4q1S-5b.mjs +1 -0
- package/dist/{login-RIw7ffPe.mjs → login-TA51e5Fw.mjs} +5 -5
- package/dist/{logs-B2OeLS4X.mjs → logs-BlyAxlvx.mjs} +6 -6
- package/dist/{migrate-DiI50Chz.mjs → migrate-BH6LCr00.mjs} +5 -5
- package/dist/migrate-CVBsSFhC.mjs +1 -0
- package/dist/nitro.d.mts +5 -0
- package/dist/nitro.mjs +27 -8
- package/dist/{node-Bc-dBAGL.mjs → node-B0otYjDv.mjs} +4 -4
- package/dist/{operator-args-D79WQP70.mjs → operator-args-DuKAQ3Ks.mjs} +1 -1
- package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
- package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
- package/dist/{operator-cmd-CEI5Aaza.mjs → operator-cmd-CoHlJjcT.mjs} +7 -7
- package/dist/operator-cmd-DnaCnCSP.mjs +1 -0
- package/dist/output-CNsMDEd2.mjs +1 -0
- package/dist/{output-BCdLioKP.mjs → output-CXJTIAtF.mjs} +1 -1
- package/dist/pages/client.d.mts +16 -13
- package/dist/pages/client.mjs +34 -66
- package/dist/pages/index.d.mts +4 -3
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/platform-args-B7-wQ0_B.mjs +1 -0
- package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-DfT8yQBF.mjs} +1 -1
- package/dist/{platform-auth-config-ZrYm8KVs.mjs → platform-auth-config-MO0VdVs9.mjs} +10 -10
- package/dist/{platform-auth-protection-t6mdY4nn.mjs → platform-auth-protection-Dv208eyL.mjs} +8 -8
- package/dist/{platform-auth-recovery-XeBmPTXx.mjs → platform-auth-recovery-DvAQ674F.mjs} +7 -7
- package/dist/{platform-cmd-C7BevP9b.mjs → platform-cmd-BpUA19r_.mjs} +1 -1
- package/dist/{platform-cmd-EXehmSYA.mjs → platform-cmd-dlSxrcQ7.mjs} +9 -9
- package/dist/{platform-domain-DR263ObA.mjs → platform-domain-DSO4eUEw.mjs} +5 -5
- package/dist/{platform-lifecycle-BvU_TNji.mjs → platform-lifecycle-BSvsyB_x.mjs} +17 -17
- package/dist/{platform-lifecycle-CN4aXldN.mjs → platform-lifecycle-CfcFygHb.mjs} +1 -1
- package/dist/{platform-management-yS2sve3V.mjs → platform-management-BMdyt667.mjs} +1 -1
- package/dist/{platform-management-_UE1_GM8.mjs → platform-management-CrP1XhVd.mjs} +4 -4
- package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-CgDiwflR.mjs} +5 -5
- package/dist/{platform-recovery-CPVk9-Q4.mjs → platform-recovery-CHWwXVZ6.mjs} +3 -3
- package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-BTQVbnTC.mjs} +3 -3
- package/dist/{plugin-inference-bQ1Be840.mjs → plugin-inference-g66Q1Mx9.mjs} +4 -4
- package/dist/prepare-Bx4a8cb1.mjs +1 -0
- package/dist/{prepare-BkRhDnxw.mjs → prepare-DJYHjpzq.mjs} +3 -3
- package/dist/{prepare-D8L9AQbw.mjs → prepare-DXduEwQp.mjs} +11 -8
- package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BN9Lmebs.mjs} +29 -13
- package/dist/prerender-render.d.mts +10 -2
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-DH3CuFC6.mjs → project-cmd-Dfb1Sg8w.mjs} +18 -18
- package/dist/{project-team-MjT5K4rQ.mjs → project-team-BO2dyc7S.mjs} +5 -5
- package/dist/{project-token-BKHGwY3k.mjs → project-token-ByO2mEI2.mjs} +5 -5
- package/dist/{project-tsconfig-BMveFb4b.mjs → project-tsconfig-nhnTWO_Y.mjs} +3 -1
- package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust-CoQfwRBR.mjs} +5 -5
- package/dist/{protocol-CkwjASep.d.mts → protocol-xZMvWsrg.d.mts} +5 -3
- package/dist/{protocol-COyySMki.mjs → protocol-yxdHxFLN.mjs} +47 -11
- package/dist/{provision-CYhZR_Mn.mjs → provision-CMH4-8ri.mjs} +1 -1
- package/dist/{provision-B0HqoRuI.mjs → provision-D5q-ptD3.mjs} +2 -2
- package/dist/{requests-daJmVpjk.mjs → requests-CPOiDkjh.mjs} +4 -4
- package/dist/resolve-project-BALVa9q0.mjs +1 -0
- package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-ClvLMTI9.mjs} +1 -1
- package/dist/{rollback-AVwiMAkk.mjs → rollback-BfCs2la4.mjs} +7 -7
- package/dist/{route-types-e69EqY88.mjs → route-types-Cl3x0Q8B.mjs} +265 -12
- package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
- package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
- package/dist/routes-stub.d.mts +10 -1
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
- package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth.d.mts +2 -2
- package/dist/runtime/auth.mjs +1 -1
- 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 +2 -2
- package/dist/runtime/client-solid.d.mts +3 -3
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.d.mts +3 -3
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.d.mts +3 -3
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.d.mts +3 -3
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/email/testing.mjs +2 -2
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/env-public.mjs +2 -46
- package/dist/runtime/fetch-server.d.mts +1 -1
- package/dist/runtime/fetch-server.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.d.mts +3 -1
- package/dist/runtime/live-client.d.mts +11 -2
- package/dist/runtime/live-client.mjs +8 -0
- package/dist/runtime/live-server.mjs +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.mjs +1 -1
- package/dist/runtime/remote/index.mjs +1 -1
- package/dist/runtime/route-url.d.mts +2 -2
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +15 -4
- package/dist/runtime/routing.mjs +93 -11
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/sse-client.d.mts +9 -1
- package/dist/runtime/sse-client.mjs +7 -0
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +1 -1
- package/dist/{scan-F0psanp7.mjs → scan-L8OSv1f7.mjs} +10 -7
- package/dist/{secret-szNdoeKa.mjs → secret-CuI6LTpD.mjs} +7 -7
- package/dist/serialize-DN-envGQ.d.mts +18 -0
- package/dist/serialize-Pf-CIQK_.mjs +39 -0
- package/dist/{skills-D393E4lB.mjs → skills-BBO9wMjB.mjs} +1 -1
- package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-BZMnCA8T.mjs} +2 -2
- package/dist/url-CuoEn0o3.mjs +43 -0
- package/dist/validator-8-NZs2Xr.mjs +168 -0
- package/dist/{version-metadata-BC3LK7Y-.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
- package/dist/wrangler-R3kMdJfw.mjs +1 -0
- package/dist/{wrangler-Gn4EoY4-.mjs → wrangler-k40T7XTQ.mjs} +2 -2
- package/dist/{wrapper-B9W9RE8z.mjs → wrapper-BGsi_uHs.mjs} +11 -8
- package/dist/{ws-Dmjg5NH2.d.mts → ws-DB8Feytg.d.mts} +2 -2
- package/docs/guide/ai.md +2 -0
- package/docs/guide/auth.md +62 -0
- package/docs/guide/database.md +33 -0
- package/docs/guide/deployment.md +8 -0
- package/docs/guide/edge/prerendering.md +9 -4
- package/docs/guide/edge/revalidation.md +3 -0
- package/docs/guide/live.md +2 -0
- package/docs/guide/pages-routing/actions-and-forms.md +15 -10
- package/docs/guide/pages-routing/head.md +3 -1
- package/docs/guide/pages-routing/islands.md +1 -1
- package/docs/guide/pages-routing/loaders.md +2 -0
- package/docs/guide/pages-routing/markdown.md +2 -2
- package/docs/guide/pages-routing/overview.md +139 -10
- package/docs/guide/quickstart.md +1 -0
- package/docs/guide/sse.md +2 -0
- package/docs/guide/ssg.md +23 -2
- package/docs/guide/storage.md +6 -2
- package/docs/guide/type-safety.md +307 -26
- package/docs/guide/typed-fetch.md +7 -3
- package/docs/guide/websockets.md +5 -5
- package/docs/integrations/cloudflare.md +10 -10
- package/docs/integrations/frameworks/nuxt.md +2 -0
- package/docs/integrations/frameworks/overview.md +2 -0
- package/docs/integrations/nodejs-bun-deno.md +65 -0
- package/docs/reference/api/auth.md +19 -0
- package/docs/reference/api/client.md +6 -4
- package/docs/reference/api/handlers.md +3 -1
- package/docs/reference/api/pages.md +8 -8
- package/docs/reference/api/resources.md +3 -1
- package/docs/reference/api/rewrites.md +16 -4
- package/docs/reference/api/types.md +9 -2
- package/docs/reference/cli/database.md +2 -0
- package/docs/reference/cli/deploy.md +17 -11
- package/docs/reference/cli.md +3 -0
- package/docs/reference/config.md +24 -2
- package/package.json +25 -23
- package/schema.json +4 -0
- package/skills/void/SKILL.md +5 -0
- package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
- package/dist/client-CEtr5UOR.mjs +0 -1
- package/dist/deploy-DMhOyebt.mjs +0 -2
- package/dist/gen-BbT1Ku1P.mjs +0 -1
- package/dist/help-Ba8Dq5-r.mjs +0 -1
- package/dist/login-BX2gzHUt.mjs +0 -1
- package/dist/migrate-CUGMGaIM.mjs +0 -1
- package/dist/operator-cmd-oTT2MA9G.mjs +0 -1
- package/dist/output-E6gecbbV.mjs +0 -1
- package/dist/platform-args-C7XUw9mw.mjs +0 -1
- package/dist/prepare-CZRVGNld.mjs +0 -1
- package/dist/resolve-project-CgfjtOwz.mjs +0 -1
- package/dist/serialize-DUuYuaY3.mjs +0 -29
- package/dist/serialize-I4EmS-Wf.d.mts +0 -16
- package/dist/validator-CTfmzZYb.mjs +0 -69
- package/dist/wrangler-CQ5c-MtJ.mjs +0 -1
- package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
- package/dist/{config-s6TkpSat.mjs → config-eeDzKBS9.mjs} +1 -1
- package/dist/{entry-DFBca6aS.mjs → entry-Bw-G1VVx.mjs} +1 -1
- package/dist/{env-types-Bd8DkQhl.mjs → env-types-Dz9qkiOn.mjs} +1 -1
- package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
- package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
- package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-
|
|
2
|
-
import {
|
|
3
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
4
|
-
import {
|
|
1
|
+
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-BQdgCVQF.mjs";
|
|
2
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-CD3pap65.mjs";
|
|
3
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-XvXTkea6.mjs";
|
|
4
|
+
import { m as printSuccess } from "./output-CXJTIAtF.mjs";
|
|
5
5
|
import { stripVTControlCharacters } from "node:util";
|
|
6
|
-
import { PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanId } from "@void/platform/plans";
|
|
7
6
|
import { readFile } from "node:fs/promises";
|
|
7
|
+
import { PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanId } from "@void/platform/plans";
|
|
8
8
|
// src/cli/platform-plans-config.ts
|
|
9
9
|
const limitLabels = {
|
|
10
10
|
requestsPerMonth: "Requests per billing month",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DZ_2Xuqd.mjs";
|
|
2
1
|
import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
|
|
3
|
-
import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-
|
|
4
|
-
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
2
|
+
import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-BSvsyB_x.mjs";
|
|
3
|
+
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-CrP1XhVd.mjs";
|
|
4
|
+
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DZ_2Xuqd.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
// src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { f as import_picocolors, s as formatLink } from "./output-
|
|
1
|
+
import { L as log, tt as isCancel } from "./dist-BQdgCVQF.mjs";
|
|
2
|
+
import { u as openBrowser } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { f as import_picocolors, s as formatLink } from "./output-CXJTIAtF.mjs";
|
|
4
4
|
// src/cli/platform-plan-writes.ts
|
|
5
5
|
function planCreatesZone(plan) {
|
|
6
6
|
return plan.actions.some((action) => action.kind === "zone" && action.action === "create");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as join, l as toSlash, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
|
|
3
2
|
import { n as globSync } from "./dist-BWNkVq50.mjs";
|
|
4
|
-
import { _ as ROUTE_EXTENSIONS, d as deriveFromSource, g as parseWebSocketFilename, h as parseRouteFilename, m as isRouteEnabledForEnvironment, p as compareRouteSpecificity, t as pageFileEnvironment } from "./scan-F0psanp7.mjs";
|
|
5
|
-
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-Cv0JwXqb.mjs";
|
|
6
3
|
import { a as staticLiteral, n as bindingResolver, o as unwrapStaticExpression, r as walk } from "./ast-bindings-BkivMJIo.mjs";
|
|
4
|
+
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-Cv0JwXqb.mjs";
|
|
5
|
+
import { _ as parseWebSocketFilename, f as deriveFromSource, g as parseRouteFilename, h as isRouteEnabledForEnvironment, m as compareRouteSpecificity, t as pageFileEnvironment, v as ROUTE_EXTENSIONS } from "./scan-L8OSv1f7.mjs";
|
|
6
|
+
import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
|
|
7
7
|
import { n as resourceNameWords, t as isResourceName } from "./resource-name-DlJ9QXzg.mjs";
|
|
8
|
-
import { r as getSsrServerEntryPath } from "./entry-
|
|
8
|
+
import { r as getSsrServerEntryPath } from "./entry-Bw-G1VVx.mjs";
|
|
9
9
|
import { existsSync, readFileSync } from "node:fs";
|
|
10
10
|
import { parseSync } from "vite";
|
|
11
11
|
// src/application-features.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareProject } from "./prepare-DXduEwQp.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as log } from "./dist-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { L as log } from "./dist-BQdgCVQF.mjs";
|
|
2
|
+
import { t as prepareProject } from "./prepare-DXduEwQp.mjs";
|
|
3
|
+
import { m as printSuccess, p as note } from "./output-CXJTIAtF.mjs";
|
|
4
4
|
// src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root) {
|
|
6
6
|
console.log();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
+
import { t as analyzeApplication } from "./application-routing-QpyC5G8z.mjs";
|
|
3
|
+
import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-eeDzKBS9.mjs";
|
|
4
|
+
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-lFdzSEa9.mjs";
|
|
5
|
+
import { c as getDatabaseCasing, p as readConfig } from "./config-5oSQhZNj.mjs";
|
|
2
6
|
import { t as discoverSchema } from "./discover-CVFCWU7W.mjs";
|
|
3
|
-
import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-s6TkpSat.mjs";
|
|
4
|
-
import { c as getDatabaseCasing, p as readConfig } from "./config-hL-S-Y9D.mjs";
|
|
5
7
|
import { s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { n as generateDbDts } from "./db-types-
|
|
8
|
-
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-
|
|
9
|
-
import {
|
|
10
|
-
import { n as generateQueueTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-e69EqY88.mjs";
|
|
11
|
-
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-lFdzSEa9.mjs";
|
|
8
|
+
import { n as generateQueueTypes, o as generateBindingTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-Cl3x0Q8B.mjs";
|
|
9
|
+
import { n as generateDbDts } from "./db-types-DdHHUVPy.mjs";
|
|
10
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-Dz9qkiOn.mjs";
|
|
11
|
+
import { i as writeFileIfChanged, n as ensureProjectTsconfig } from "./project-tsconfig-nhnTWO_Y.mjs";
|
|
12
12
|
import { existsSync, rmSync } from "node:fs";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
// src/codegen/prepare.ts
|
|
@@ -27,6 +27,9 @@ async function prepareProject(root) {
|
|
|
27
27
|
const outDir = join(root, ".void");
|
|
28
28
|
const written = [];
|
|
29
29
|
const removed = [];
|
|
30
|
+
const bindingTypes = generateBindingTypes(config);
|
|
31
|
+
if (bindingTypes) writeGeneratedFile(outDir, "bindings.d.ts", bindingTypes, written);
|
|
32
|
+
else removeGeneratedFile(outDir, "bindings.d.ts", removed);
|
|
30
33
|
const envFile = findEnvFileForPaths(root, paths);
|
|
31
34
|
if (envFile) {
|
|
32
35
|
const { dts } = generateEnvTypes(envFile, outDir);
|
|
@@ -8,17 +8,33 @@ function assertNoPrerenderFailures(failed) {
|
|
|
8
8
|
const details = failed.map(({ path, error }) => ` ${path}: ${error}`).join("\n");
|
|
9
9
|
throw new Error(`${failed.length} page(s) failed to prerender:\n${details}`);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
11
|
+
function tryDecode(value, decode) {
|
|
12
|
+
try {
|
|
13
|
+
return decode(value);
|
|
14
|
+
} catch {
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function filePathForPath(path, host) {
|
|
19
|
+
return host === "node" ? tryDecode(path, decodeURI) : path.split("/").map((segment) => tryDecode(segment, decodeURIComponent)).join("/");
|
|
20
|
+
}
|
|
21
|
+
function outputFileForPath(path, host = "cloudflare") {
|
|
22
|
+
if (path === "/404/") return "404.html";
|
|
23
|
+
if (path.endsWith("/")) return `${filePathForPath(path, host).slice(1)}index.html`;
|
|
24
|
+
return path === "/" ? "index.html" : `${filePathForPath(path, host).slice(1)}.html`;
|
|
13
25
|
}
|
|
14
26
|
async function readPrerenderPathsResponse(response) {
|
|
15
|
-
if (!response.ok)
|
|
27
|
+
if (!response.ok) {
|
|
28
|
+
const body = await response.json().catch(() => null);
|
|
29
|
+
const detail = typeof body?.error === "string" ? body.error : `HTTP ${response.status}.`;
|
|
30
|
+
throw new Error(`prerender: Failed to collect prerender paths. ${detail}`);
|
|
31
|
+
}
|
|
16
32
|
const payload = await response.json();
|
|
17
33
|
if (!payload || !Array.isArray(payload.paths) || !payload.paths.every((path) => typeof path === "string")) throw new Error("prerender: Failed to collect prerender paths. Response payload is invalid.");
|
|
18
34
|
return payload.paths;
|
|
19
35
|
}
|
|
20
|
-
function pageDataFileForPath(path) {
|
|
21
|
-
return path === "/" ? "_void/pages/index.json" : `_void/pages/${path.slice(1)}.json`;
|
|
36
|
+
function pageDataFileForPath(path, host) {
|
|
37
|
+
return path === "/" ? "_void/pages/index.json" : `_void/pages/${filePathForPath(path, host).slice(1)}${path.endsWith("/") ? "index" : ""}.json`;
|
|
22
38
|
}
|
|
23
39
|
/** Whether `path` resolves strictly inside `directory`. */
|
|
24
40
|
function isInside(directory, path) {
|
|
@@ -28,8 +44,8 @@ function isInside(directory, path) {
|
|
|
28
44
|
function normalizedFile(clientDir, path) {
|
|
29
45
|
return join(clientDir, path).normalize("NFC").toLowerCase();
|
|
30
46
|
}
|
|
31
|
-
function generatedFiles(path, clientDir) {
|
|
32
|
-
return [outputFileForPath(path), pageDataFileForPath(path)].map((file) => normalizedFile(clientDir, file));
|
|
47
|
+
function generatedFiles(path, clientDir, host) {
|
|
48
|
+
return [outputFileForPath(path, host), pageDataFileForPath(path, host)].map((file) => normalizedFile(clientDir, file));
|
|
33
49
|
}
|
|
34
50
|
function requestAssetCandidates(path, clientDir) {
|
|
35
51
|
const relativePath = path === "/" ? "" : path.slice(1);
|
|
@@ -51,8 +67,8 @@ function requestAssetCandidates(path, clientDir) {
|
|
|
51
67
|
} catch {}
|
|
52
68
|
return new Set([...candidates].map((file) => normalizedFile(clientDir, file)));
|
|
53
69
|
}
|
|
54
|
-
function renderConcurrency(paths, clientDir) {
|
|
55
|
-
const outputs = paths.map((path) => generatedFiles(path, clientDir));
|
|
70
|
+
function renderConcurrency(paths, clientDir, host) {
|
|
71
|
+
const outputs = paths.map((path) => generatedFiles(path, clientDir, host));
|
|
56
72
|
const ownerByOutput = /* @__PURE__ */ new Map();
|
|
57
73
|
for (let index = 0; index < outputs.length; index++) for (const output of outputs[index]) {
|
|
58
74
|
if (ownerByOutput.has(output)) return 1;
|
|
@@ -72,20 +88,20 @@ function renderConcurrency(paths, clientDir) {
|
|
|
72
88
|
return 4;
|
|
73
89
|
}
|
|
74
90
|
/** Shared renderer for local Workers and the isolated Node prerender child. */
|
|
75
|
-
async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData, onResult) {
|
|
91
|
+
async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData, onResult, host = "cloudflare") {
|
|
76
92
|
const results = paths.map(() => ({
|
|
77
93
|
rendered: [],
|
|
78
94
|
failed: []
|
|
79
95
|
}));
|
|
80
96
|
let next = 0;
|
|
81
|
-
await Promise.all(Array.from({ length: Math.min(paths.length, renderConcurrency(paths, clientDir)) }, async () => {
|
|
97
|
+
await Promise.all(Array.from({ length: Math.min(paths.length, renderConcurrency(paths, clientDir, host)) }, async () => {
|
|
82
98
|
while (next < paths.length) {
|
|
83
99
|
const index = next++;
|
|
84
100
|
const path = paths[index];
|
|
85
101
|
const result = results[index];
|
|
86
|
-
const outputFile = outputFileForPath(path);
|
|
102
|
+
const outputFile = outputFileForPath(path, host);
|
|
87
103
|
const outputPath = join(clientDir, outputFile);
|
|
88
|
-
const pageDataPath = join(clientDir, pageDataFileForPath(path));
|
|
104
|
+
const pageDataPath = join(clientDir, pageDataFileForPath(path, host));
|
|
89
105
|
if (!isInside(clientDir, outputPath) || !isInside(join(clientDir, "_void/pages"), pageDataPath)) {
|
|
90
106
|
const error = "prerender path resolves outside the output directory";
|
|
91
107
|
result.failed.push({
|
|
@@ -6,7 +6,15 @@ export type PrerenderResult = {
|
|
|
6
6
|
}>;
|
|
7
7
|
};
|
|
8
8
|
export declare function assertNoPrerenderFailures(failed: PrerenderResult["failed"]): void;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Static file server that will serve the prerendered files. Hosts decode the
|
|
11
|
+
* request path before the file lookup, so files are written decoded:
|
|
12
|
+
* Cloudflare assets decode each segment with decodeURIComponent, and Hono's
|
|
13
|
+
* serveStatic (Node, Bun, Deno) uses decodeURI, which keeps reserved
|
|
14
|
+
* characters such as %23 and %3F encoded.
|
|
15
|
+
*/
|
|
16
|
+
export type PrerenderHost = "cloudflare" | "node";
|
|
17
|
+
export declare function outputFileForPath(path: string, host?: PrerenderHost): string;
|
|
10
18
|
export declare function readPrerenderPathsResponse(response: Response): Promise<Array<string>>;
|
|
11
19
|
/** Shared renderer for local Workers and the isolated Node prerender child. */
|
|
12
|
-
export declare function renderPrerenderPaths(paths: Array<string>, clientDir: string, fetchPath: (path: string) => Promise<Response>, fetchPageData?: (path: string) => Promise<Response>, onResult?: (path: string, outputFile: string, error?: string) => void): Promise<PrerenderResult>;
|
|
20
|
+
export declare function renderPrerenderPaths(paths: Array<string>, clientDir: string, fetchPath: (path: string) => Promise<Response>, fetchPageData?: (path: string) => Promise<Response>, onResult?: (path: string, outputFile: string, error?: string) => void, host?: PrerenderHost): Promise<PrerenderResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as assertNoPrerenderFailures, n as outputFileForPath, r as readPrerenderPathsResponse, i as renderPrerenderPaths } from "./prerender-render-
|
|
1
|
+
export { t as assertNoPrerenderFailures, n as outputFileForPath, r as readPrerenderPathsResponse, i as renderPrerenderPaths } from "./prerender-render-BN9Lmebs.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
5
|
-
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-
|
|
2
|
+
import { H as outro, L as log } from "./dist-BQdgCVQF.mjs";
|
|
3
|
+
import { c as getToken, s as getSiteDomain } from "./auth-CCk9Seol.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEZmTP6p.mjs";
|
|
5
|
+
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-CXJTIAtF.mjs";
|
|
6
6
|
// src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
@@ -37,77 +37,77 @@ async function runProjectsCommand(root) {
|
|
|
37
37
|
async function runProjectCommand(root, args) {
|
|
38
38
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
39
39
|
if (args.subcommand === "status") {
|
|
40
|
-
const { runListCommand } = await import("./list-
|
|
40
|
+
const { runListCommand } = await import("./list-iCg7d5Pa.mjs");
|
|
41
41
|
return runListCommand(root, args.name || void 0);
|
|
42
42
|
}
|
|
43
43
|
if (args.subcommand === "link") {
|
|
44
44
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
45
|
-
const { runLink } = await import("./link-
|
|
45
|
+
const { runLink } = await import("./link-BlRTGHan.mjs");
|
|
46
46
|
return runLink(root, args.name || void 0);
|
|
47
47
|
}
|
|
48
48
|
if (args.subcommand === "list") {
|
|
49
49
|
if (cloudflare) {
|
|
50
|
-
const { runListCommand } = await import("./list-
|
|
50
|
+
const { runListCommand } = await import("./list-iCg7d5Pa.mjs");
|
|
51
51
|
return runListCommand(root);
|
|
52
52
|
}
|
|
53
53
|
return runProjectsCommand(root);
|
|
54
54
|
}
|
|
55
55
|
if (args.subcommand === "token") {
|
|
56
56
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
57
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
57
|
+
const { runProjectTokenCommand } = await import("./project-token-ByO2mEI2.mjs");
|
|
58
58
|
return runProjectTokenCommand(root, args);
|
|
59
59
|
}
|
|
60
60
|
if (args.subcommand === "team") {
|
|
61
61
|
if (args.action === "") {
|
|
62
|
-
const { printHelpPage } = await import("./help-
|
|
62
|
+
const { printHelpPage } = await import("./help-C_cqTByy.mjs");
|
|
63
63
|
printHelpPage(["project", "team"]);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
67
67
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
68
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
68
|
+
const { runProjectTeamCommand } = await import("./project-team-BO2dyc7S.mjs");
|
|
69
69
|
return runProjectTeamCommand(root, args);
|
|
70
70
|
}
|
|
71
71
|
if (args.subcommand === "zero-trust") {
|
|
72
72
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
73
73
|
if (args.action === "") {
|
|
74
|
-
const { printHelpPage } = await import("./help-
|
|
74
|
+
const { printHelpPage } = await import("./help-C_cqTByy.mjs");
|
|
75
75
|
printHelpPage(["project", "zero-trust"]);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
const action = args.action;
|
|
79
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
79
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-CoQfwRBR.mjs");
|
|
80
80
|
return runProjectZeroTrustCommand(root, {
|
|
81
81
|
...args,
|
|
82
82
|
action
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
if (args.subcommand === "logs") {
|
|
86
|
-
const { runLogsCommand } = await import("./logs-
|
|
86
|
+
const { runLogsCommand } = await import("./logs-BlyAxlvx.mjs");
|
|
87
87
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
88
88
|
}
|
|
89
89
|
if (args.subcommand === "requests") {
|
|
90
90
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
91
|
-
const { runRequestsCommand } = await import("./requests-
|
|
91
|
+
const { runRequestsCommand } = await import("./requests-CPOiDkjh.mjs");
|
|
92
92
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
93
93
|
}
|
|
94
94
|
if (args.subcommand === "rollback") {
|
|
95
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
95
|
+
const { runRollbackCommand } = await import("./rollback-BfCs2la4.mjs");
|
|
96
96
|
return runRollbackCommand(root, args.deployId || void 0, args.platform);
|
|
97
97
|
}
|
|
98
98
|
if (args.subcommand === "cancel") {
|
|
99
99
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
100
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
100
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-COavnjud.mjs");
|
|
101
101
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
102
102
|
}
|
|
103
103
|
if (args.subcommand === "delete") {
|
|
104
104
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
105
|
-
const { runDeleteCommand } = await import("./delete-
|
|
105
|
+
const { runDeleteCommand } = await import("./delete-Dey6YoMA.mjs");
|
|
106
106
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
107
107
|
}
|
|
108
108
|
if (args.subcommand === "purge-cache") {
|
|
109
109
|
if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
|
|
110
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
110
|
+
const { runPurgeCacheCommand } = await import("./cache-DVBBbWQL.mjs");
|
|
111
111
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { H as outro, L as log } from "./dist-BQdgCVQF.mjs";
|
|
2
|
+
import { c as getToken, i as getAccountCredential } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BEZmTP6p.mjs";
|
|
4
|
+
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-CXJTIAtF.mjs";
|
|
1
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-CoxPEhJq.mjs";
|
|
5
|
-
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-BCdLioKP.mjs";
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-ClvLMTI9.mjs";
|
|
7
7
|
// src/cli/project-team.ts
|
|
8
8
|
function clean(value) {
|
|
9
9
|
return (value ?? "—").replace(/[\u0000-\u001f\u007f]/g, " ");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { H as outro, L as log } from "./dist-BQdgCVQF.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-BEZmTP6p.mjs";
|
|
4
|
+
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-CXJTIAtF.mjs";
|
|
1
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
|
-
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
6
|
-
import { r as requireProjectBySlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
6
|
+
import { r as requireProjectBySlug } from "./resolve-project-ClvLMTI9.mjs";
|
|
7
7
|
// src/cli/project-token.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const humanToken = getToken(root);
|
|
@@ -34,13 +34,15 @@ function createProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options =
|
|
|
34
34
|
const includeMd = existsSync(join(outDir, "md.d.ts"));
|
|
35
35
|
const includeEnv = existsSync(join(outDir, "env.d.ts"));
|
|
36
36
|
const includeAuth = existsSync(join(outDir, "auth.d.ts"));
|
|
37
|
+
const includeBindings = existsSync(join(outDir, "bindings.d.ts"));
|
|
37
38
|
const tsconfig = { files: [
|
|
38
39
|
...includeRoutes ? ["routes.d.ts"] : [],
|
|
39
40
|
...hasDb ? ["db.d.ts"] : [],
|
|
40
41
|
...includeQueues ? ["queues.d.ts"] : [],
|
|
41
42
|
...includeMd ? ["md.d.ts"] : [],
|
|
42
43
|
...includeEnv ? ["env.d.ts"] : [],
|
|
43
|
-
...includeAuth ? ["auth.d.ts"] : []
|
|
44
|
+
...includeAuth ? ["auth.d.ts"] : [],
|
|
45
|
+
...includeBindings ? ["bindings.d.ts"] : []
|
|
44
46
|
] };
|
|
45
47
|
if (hasDb) {
|
|
46
48
|
const paths = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { H as outro, L as log } from "./dist-BQdgCVQF.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-BEZmTP6p.mjs";
|
|
4
|
+
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-CXJTIAtF.mjs";
|
|
1
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
|
-
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-BCdLioKP.mjs";
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-ClvLMTI9.mjs";
|
|
7
7
|
// src/cli/project-zero-trust.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-DjqciiDc.mjs";
|
|
1
2
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-MeF_5M_3.mjs";
|
|
2
3
|
import { a as PageRenderMode, t as DevCssAsset } from "./types-agfx0alu.mjs";
|
|
3
|
-
import {
|
|
4
|
+
import { Context } from "hono";
|
|
4
5
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
5
6
|
declare function safeJsonStringify(value: unknown): string;
|
|
6
7
|
type PageObject = {
|
|
@@ -19,6 +20,7 @@ type PageObject = {
|
|
|
19
20
|
type PageRenderResult = string | ReadableStream<Uint8Array>;
|
|
20
21
|
type PageHandler = ((c: CloudContext) => unknown | Promise<unknown>) | undefined;
|
|
21
22
|
type PageHeadHandler = ((c: CloudContext, props: Record<string, unknown>) => HeadDescriptor | undefined) | undefined;
|
|
23
|
+
type PageRequestContext = Context | CloudContext;
|
|
22
24
|
type PageRenderOptions = {
|
|
23
25
|
renderMode?: PageRenderMode;
|
|
24
26
|
/** Dev server build: rejected deferred props keep their raw error message. */
|
|
@@ -36,7 +38,7 @@ type GetAssetTags = (req: Request, env: CloudBindings, componentId: string) => P
|
|
|
36
38
|
/** Flatten withValidator's { issues: [{ slot, issues: [{ message, path }] }] } into { field: message } */
|
|
37
39
|
declare function flattenValidationErrors(body: unknown): Record<string, string>;
|
|
38
40
|
/** Handle GET page request — run handler, return page object or SSR HTML */
|
|
39
|
-
declare function handlePageGet(handler: PageHandler, headFn: PageHeadHandler, c:
|
|
41
|
+
declare function handlePageGet(handler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
|
|
40
42
|
/** Handle POST/PUT/PATCH/DELETE page request — run mutation, then re-run GET or redirect */
|
|
41
|
-
declare function handlePageMutation(mutationHandler: PageHandler, getHandler: PageHandler, headFn: PageHeadHandler, c:
|
|
43
|
+
declare function handlePageMutation(mutationHandler: PageHandler, getHandler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
|
|
42
44
|
export { handlePageMutation as a, handlePageGet as i, PageRenderResult as n, safeJsonStringify as o, flattenValidationErrors as r, PageObject as t };
|
|
@@ -2,7 +2,8 @@ import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as
|
|
|
2
2
|
import { n as isConvertedResponse } from "./response-HmNjB30w.mjs";
|
|
3
3
|
import { i as searchWithoutActionKey, n as hasActionKey } from "./action-key-XtKKbbsi.mjs";
|
|
4
4
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "./head-5XPcnG-j.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { a as serializePageData, o as escapeScriptJson } from "./serialize-Pf-CIQK_.mjs";
|
|
6
|
+
import { PAGES_PROTOCOL_VERSION } from "@void/edge";
|
|
6
7
|
// src/pages/protocol.ts
|
|
7
8
|
const POWERED_BY = { "X-Powered-By": "Void" };
|
|
8
9
|
const RENDER_ERROR_ASSET_TAGS_KEY = "__voidPageAssetTags";
|
|
@@ -13,9 +14,25 @@ function safeJsonStringify(value) {
|
|
|
13
14
|
function isPagesRequest(c) {
|
|
14
15
|
return c.req.header("x-voidpages") === "true";
|
|
15
16
|
}
|
|
17
|
+
function needsPageReload(c) {
|
|
18
|
+
return isPagesRequest(c) && c.req.header("X-VoidPages-Version") !== PAGES_PROTOCOL_VERSION;
|
|
19
|
+
}
|
|
20
|
+
/** Old clients reload a successful non-Pages response; form errors stay readable. */
|
|
21
|
+
function legacyPageResponse(c, errors = null) {
|
|
22
|
+
const headers = pageResponseHeaders(c, {
|
|
23
|
+
"Content-Type": errors ? "application/json" : "text/plain; charset=utf-8",
|
|
24
|
+
"Cache-Control": "no-store",
|
|
25
|
+
Vary: "X-VoidPages, X-VoidPages-Version"
|
|
26
|
+
});
|
|
27
|
+
headers.delete("X-VoidPages");
|
|
28
|
+
return new Response(errors ? JSON.stringify({ errors }) : null, {
|
|
29
|
+
status: errors ? 422 : 200,
|
|
30
|
+
headers
|
|
31
|
+
});
|
|
32
|
+
}
|
|
16
33
|
function pageResponseHeaders(c, headers) {
|
|
17
34
|
const out = new Headers(c.res.headers);
|
|
18
|
-
for (const [key, value] of Object.entries(headers)) if (key.toLowerCase() === "vary") appendVary(out,
|
|
35
|
+
for (const [key, value] of Object.entries(headers)) if (key.toLowerCase() === "vary") for (const name of value.split(",")) appendVary(out, name.trim());
|
|
19
36
|
else out.set(key, value);
|
|
20
37
|
return out;
|
|
21
38
|
}
|
|
@@ -23,6 +40,12 @@ function appendVary(headers, name) {
|
|
|
23
40
|
const existing = headers.get("Vary")?.split(",").map((value) => value.trim().toLowerCase()) ?? [];
|
|
24
41
|
if (!existing.includes("*") && !existing.includes(name.toLowerCase())) headers.append("Vary", name);
|
|
25
42
|
}
|
|
43
|
+
function varyPagesResponse(c) {
|
|
44
|
+
const headers = new Headers(c.res.headers);
|
|
45
|
+
appendVary(headers, "X-VoidPages");
|
|
46
|
+
appendVary(headers, "X-VoidPages-Version");
|
|
47
|
+
c.header("Vary", headers.get("Vary"));
|
|
48
|
+
}
|
|
26
49
|
function escapeHtmlAttr(value) {
|
|
27
50
|
return value.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<");
|
|
28
51
|
}
|
|
@@ -112,9 +135,11 @@ async function renderPageHtml(c, pageObj, componentId, renderMode, renderFn, get
|
|
|
112
135
|
};
|
|
113
136
|
}
|
|
114
137
|
function pageJsonResponse(c, pageObj) {
|
|
115
|
-
return Response
|
|
138
|
+
return new Response(serializePageData(pageObj), { headers: pageResponseHeaders(c, {
|
|
116
139
|
"X-VoidPages": "true",
|
|
117
|
-
|
|
140
|
+
"X-VoidPages-Version": PAGES_PROTOCOL_VERSION,
|
|
141
|
+
"Content-Type": "application/json",
|
|
142
|
+
Vary: "X-VoidPages, X-VoidPages-Version",
|
|
118
143
|
...POWERED_BY
|
|
119
144
|
}) });
|
|
120
145
|
}
|
|
@@ -224,14 +249,22 @@ function streamDeferredResponse(initialChunk, deferredMap, c, contentType, dev,
|
|
|
224
249
|
});
|
|
225
250
|
return renderedResponse(c, readable, contentType, assetTags);
|
|
226
251
|
}
|
|
252
|
+
function asCloudContext(c) {
|
|
253
|
+
return c;
|
|
254
|
+
}
|
|
227
255
|
/** Handle GET page request — run handler, return page object or SSR HTML */
|
|
228
256
|
async function handlePageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
257
|
+
return runPageGet(handler, headFn, asCloudContext(c), componentId, renderFn, getAssetTags, configHead, options);
|
|
258
|
+
}
|
|
259
|
+
async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
229
260
|
const renderMode = options?.renderMode ?? "server";
|
|
261
|
+
if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
|
|
230
262
|
return runLoader(handler, c, async (props) => {
|
|
231
263
|
const shared = c.get("shared") ?? {};
|
|
232
264
|
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
233
265
|
const middlewareHead = c.get("headDefaults");
|
|
234
266
|
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
267
|
+
if (renderMode !== "island") varyPagesResponse(c);
|
|
235
268
|
const { immediateProps, deferredMap } = separateDeferred(props);
|
|
236
269
|
const hasDeferred = Object.keys(deferredMap).length > 0;
|
|
237
270
|
const deferredKeys = {};
|
|
@@ -275,13 +308,11 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
|
|
|
275
308
|
}
|
|
276
309
|
if (!hasDeferred) return pageJsonResponse(c, pageObj);
|
|
277
310
|
c.header("X-VoidPages", "true");
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
c.header("Vary", headers.get("Vary"));
|
|
281
|
-
return streamDeferredResponse(JSON.stringify(pageObj) + "\n", deferredMap, c, "application/x-ndjson", options?.dev === true, (group, data) => JSON.stringify({
|
|
311
|
+
c.header("X-VoidPages-Version", PAGES_PROTOCOL_VERSION);
|
|
312
|
+
return streamDeferredResponse(serializePageData(pageObj) + "\n", deferredMap, c, "application/x-ndjson", options?.dev === true, (group, data) => serializePageData({
|
|
282
313
|
__deferred: group,
|
|
283
|
-
data
|
|
284
|
-
}) + "\n", (group, error) =>
|
|
314
|
+
data
|
|
315
|
+
}) + "\n", (group, error) => serializePageData({
|
|
285
316
|
__deferred: group,
|
|
286
317
|
error
|
|
287
318
|
}) + "\n");
|
|
@@ -290,7 +321,7 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
|
|
|
290
321
|
if (!hasDeferred) return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
291
322
|
return streamDeferredResponse(html, deferredMap, c, "text/html; charset=utf-8", options?.dev === true, (group, data) => {
|
|
292
323
|
const g = safeJsonStringify(group);
|
|
293
|
-
return `\n<script>(function(d){window.__resolveDeferred?window.__resolveDeferred(${g},d):(window.__deferredQueue??=[]).push([${g},d])})(${
|
|
324
|
+
return `\n<script>(function(d){window.__resolveDeferred?window.__resolveDeferred(${g},d,true):(window.__deferredQueue??=[]).push([${g},d,0,true])})(${serializePageData(data)})<\/script>`;
|
|
294
325
|
}, (group, error) => {
|
|
295
326
|
const g = safeJsonStringify(group);
|
|
296
327
|
return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
|
|
@@ -313,6 +344,9 @@ function isSameOriginAction(request) {
|
|
|
313
344
|
}
|
|
314
345
|
/** Handle POST/PUT/PATCH/DELETE page request — run mutation, then re-run GET or redirect */
|
|
315
346
|
async function handlePageMutation(mutationHandler, getHandler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
347
|
+
return runPageMutation(mutationHandler, getHandler, headFn, asCloudContext(c), componentId, renderFn, getAssetTags, configHead, options);
|
|
348
|
+
}
|
|
349
|
+
async function runPageMutation(mutationHandler, getHandler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
316
350
|
if (!isSameOriginAction(c.req.raw)) return new Response("Cross-origin page actions are not allowed.", { status: 403 });
|
|
317
351
|
const renderMode = options?.renderMode ?? "server";
|
|
318
352
|
function buildMutationPageObj(props, errors) {
|
|
@@ -333,9 +367,11 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
|
|
|
333
367
|
const rerenderErrors = /* @__PURE__ */ new WeakSet();
|
|
334
368
|
/** Re-run the GET loader and respond with the page, optionally carrying validation errors. */
|
|
335
369
|
async function respondWithPage(errors) {
|
|
370
|
+
if (needsPageReload(c)) return legacyPageResponse(c, errors);
|
|
336
371
|
try {
|
|
337
372
|
return await runLoader(getHandler, c, async (props) => {
|
|
338
373
|
const pageObj = buildMutationPageObj(stripDeferred(props), errors);
|
|
374
|
+
varyPagesResponse(c);
|
|
339
375
|
if (isPagesRequest(c)) return pageJsonResponse(c, pageObj);
|
|
340
376
|
const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
|
|
341
377
|
return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-
|
|
1
|
+
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-D5q-ptD3.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
|
|
3
|
-
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-Gn4EoY4-.mjs";
|
|
4
3
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
5
|
-
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-
|
|
4
|
+
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-BcPvlMFd.mjs";
|
|
5
|
+
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-k40T7XTQ.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
|
|
8
8
|
import { isRecord } from "@void/deploy-core";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { H as outro, L as log } from "./dist-BQdgCVQF.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-BEZmTP6p.mjs";
|
|
4
|
+
import { f as import_picocolors, i as dim } from "./output-CXJTIAtF.mjs";
|
|
1
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
|
-
import { f as import_picocolors, i as dim } from "./output-BCdLioKP.mjs";
|
|
6
6
|
// src/cli/requests.ts
|
|
7
7
|
async function runRequestsCommand(root, range, status) {
|
|
8
8
|
console.log();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as inferDefaultSlug } from "./resolve-project-ClvLMTI9.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { L as log } from "./dist-BQdgCVQF.mjs";
|
|
1
2
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
3
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
3
|
-
import { L as log } from "./dist-D23AAMxT.mjs";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
// src/cli/resolve-project.ts
|
|
6
6
|
function getRequestedProjectSlug(options) {
|