void 0.26.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{account-cmd-CfUXh_nU.mjs → account-cmd-Ci00cncT.mjs} +5 -5
- package/dist/{agents-B_pX_HmQ.mjs → agents-CuNtT0D_.mjs} +5 -2
- package/dist/{application-analysis-DKy02UY0.mjs → application-analysis-D72ZQfMZ.mjs} +118 -135
- package/dist/{application-routing-DQyUh_5S.mjs → application-routing-Dy589Vgn.mjs} +1 -2
- package/dist/atomic-write-Dq6R0BPN.mjs +18 -0
- package/dist/{auth-B5_tZLxT.mjs → auth-B6iOCjKI.mjs} +23 -56
- package/dist/{auth-link-D5RmKnzh.mjs → auth-link-DWr6Afao.mjs} +10 -10
- package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
- package/dist/{auth-router-Bap-pvbn.mjs → auth-router-DP14wVkZ.mjs} +4 -4
- package/dist/auth-wn6F8dB8.mjs +2 -0
- package/dist/base64-DVrOndmI.mjs +16 -0
- package/dist/{better-auth-shared-CPvWD3nG.d.mts → better-auth-shared-B74NJIus.d.mts} +8 -13
- package/dist/{better-auth-shared-DPpj8zxc.mjs → better-auth-shared-CMXlZG7W.mjs} +56 -68
- package/dist/{build-cmd-B58c8iS8.mjs → build-cmd-Cr3FJxv0.mjs} +5 -5
- package/dist/{cache-Bo52trKF.mjs → cache-D0Tt28cn.mjs} +5 -5
- package/dist/{cancel-deploy-BZNz3Q26.mjs → cancel-deploy-CJKvk7AN.mjs} +4 -4
- package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
- package/dist/{cf-access-ngGqZpHZ.mjs → cf-access-CWP4avfP.mjs} +3 -7
- package/dist/cf-build-output-2u583yJK.mjs +2 -0
- package/dist/{cf-build-output-DjvB_872.mjs → cf-build-output-Bc8i3dzE.mjs} +2 -2
- package/dist/cf-user-agent-ChjQp2MU.mjs +33 -0
- package/dist/cli/cli.mjs +198 -311
- package/dist/cli/cloudflare-operation-process.mjs +46 -14
- package/dist/cli/env-schema-probe.d.mts +5 -43
- package/dist/cli/env-schema-probe.mjs +14 -80
- package/dist/client-C1BjRn3g.mjs +2 -0
- package/dist/{client-C2Prx_Bi.mjs → client-DM9Kcf4e.mjs} +161 -415
- package/dist/{cloudflare-auth-CuxfF6OA.mjs → cloudflare-auth-CqFBDo52.mjs} +12 -39
- package/dist/{cloudflare-cmd-lHqNlJGW.mjs → cloudflare-cmd-CTrn-lXJ.mjs} +6 -5
- package/dist/{cloudflare-config-BmhBv3HV.mjs → cloudflare-config-DV60XFFK.mjs} +16 -28
- package/dist/{cloudflare-connect-2G3rL2rP.mjs → cloudflare-connect-BosmCNlq.mjs} +3 -3
- package/dist/{cloudflare-operations-CwI1bChl.mjs → cloudflare-operations-BKdSfNBN.mjs} +26 -34
- package/dist/{cloudflare-operations-BlYLlowZ.mjs → cloudflare-operations-Ds-lX3Ts.mjs} +1 -1
- package/dist/{cloudflare-process-2-TfIEzB.mjs → cloudflare-process-CeDWJRhj.mjs} +12 -7
- package/dist/collect-NUlJMpLY.mjs +2 -0
- package/dist/{collect-DiTn9yr6.mjs → collect-xjffdCdk.mjs} +1 -1
- package/dist/{config-CSa15FvD.d.mts → config-7qoq2p9v.d.mts} +2 -2
- package/dist/{config-CLYAosnQ.mjs → config-BEm9vRvS.mjs} +11 -5
- package/dist/{config-DiowPT80.mjs → config-Bx_1SpnO.mjs} +87 -177
- package/dist/config-CNnrSMYm.mjs +2 -0
- package/dist/{config-DPByhVck.mjs → config-D0GY5ItR.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-X0MUA1gk.mjs → connect-nukQSoEO.mjs} +8 -8
- package/dist/{create-project-DxiyW6iX.mjs → create-project-D4APeBwX.mjs} +7 -7
- package/dist/{create-project-iwkbqiBU.mjs → create-project-DL7YXpjj.mjs} +1 -1
- package/dist/{db-XnVMHzoV.mjs → db-27RztQLy.mjs} +173 -263
- package/dist/{delete-esYlMiSJ.mjs → delete-BbsZFZIw.mjs} +5 -5
- package/dist/deploy-B06EQq4t.mjs +6009 -0
- package/dist/deploy-Db2ALnQP.mjs +3 -0
- package/dist/deploy-managed-static-CGswbcay.mjs +2277 -0
- package/dist/deploy-transport-BiicfoQW.mjs +180 -0
- package/dist/deploy.d.mts +10 -0
- package/dist/deploy.mjs +82 -0
- package/dist/dev-inbox-Rd6j_8vM.mjs +217 -0
- package/dist/discover-CTUiSsfG.mjs +2 -0
- package/dist/{discover-CkCYv9T_.mjs → discover-D2PGT63u.mjs} +2 -2
- package/dist/{dist-BVqXeR_h.mjs → dist-ipQi0Q8y.mjs} +2 -3
- package/dist/{domain-CbbBWhWE.mjs → domain-Bfq9n03H.mjs} +7 -22
- package/dist/{dotenv-BfU6eqFt.mjs → dotenv-CNazY3-w.mjs} +4 -16
- package/dist/{email-d_Aux1vM.mjs → email-BcjSyAL0.mjs} +4 -20
- package/dist/{email-CpuT42g7.mjs → email-DIwaQU4P.mjs} +99 -191
- package/dist/email-cloudflare-CH053RxK.mjs +1096 -0
- package/dist/email-protocol-D9nTvhCp.mjs +82 -0
- package/dist/{entry-CMAkqBmU.mjs → entry-ehmBvs5w.mjs} +2 -2
- package/dist/{env-BxocywBB.mjs → env-BJjULvL0.mjs} +2 -2
- package/dist/{env-DMA3cXZt.mjs → env-BhdWMrNy.mjs} +2 -13
- package/dist/{env-w9jOyGZn.mjs → env-C6ipBLp3.mjs} +8 -8
- package/dist/{env-public-DR7ZM6d-.d.mts → env-public-CCdykygU.d.mts} +6 -23
- package/dist/{env-raw-jZpP5n47.mjs → env-raw-Cklzcde3.mjs} +3 -20
- package/dist/{env-types-CwXgeMgL.mjs → env-types-DS2_y4X8.mjs} +2 -2
- package/dist/{env-validation-CrVNjsPm.mjs → env-validation-CTn-HhG1.mjs} +1 -1
- package/dist/env-validation-cE0zcmzO.mjs +486 -0
- package/dist/{gen-DtkQhvQg.mjs → gen-CnN1Xidx.mjs} +131 -253
- package/dist/gen-F8pSZnhc.mjs +2 -0
- package/dist/{generate-GDbL7sUr.mjs → generate-Dat0UTry.mjs} +38 -4
- package/dist/generate-Rii9klHB.mjs +2 -0
- package/dist/generated-wrangler-config-DeWj5F9Y.mjs +18 -0
- package/dist/{github-cmd-D_FsOFxq.mjs → github-cmd-BdkU4Nhe.mjs} +27 -71
- package/dist/{handler-BHAn2fZJ.mjs → handler-BZ1t7-Rv.mjs} +2 -2
- package/dist/{handler-CNAwjRcW.d.mts → handler-_PqY82xe.d.mts} +1 -1
- package/dist/{headers-DlfR78Nu.mjs → headers-Di1FsD3e.mjs} +26 -81
- package/dist/{help-CVFBTmBx.mjs → help-Bug7pyK_.mjs} +18 -10
- package/dist/help-s9q7LTcu.mjs +2 -0
- package/dist/{inbound-PfQDLXc5.mjs → inbound-DmkTQeWp.mjs} +71 -222
- package/dist/{inbound-CH5Mksyy.d.mts → inbound-brj2-TM5.d.mts} +19 -58
- package/dist/index.d.mts +2 -18
- package/dist/index.mjs +200 -496
- package/dist/{info-PYWwkWyt.mjs → info-CujPwtMe.mjs} +5 -5
- package/dist/{init-Bw-fRKGp.mjs → init-ZWOJvc-Z.mjs} +179 -388
- package/dist/isr-config-DPjXM8J2.mjs +194 -0
- package/dist/{link-DlPG8iX3.mjs → link-UEc7bnF4.mjs} +8 -8
- package/dist/{list-2GN7_ueV.mjs → list-CuWeOnzk.mjs} +6 -17
- package/dist/{live-CgQuTpqD.mjs → live-BxLX-JqJ.mjs} +19 -17
- package/dist/{live-Du8jXwOW.d.mts → live-DJONVlQK.d.mts} +1 -1
- package/dist/load-user-env-DD5qveNU.mjs +49 -0
- package/dist/{local-d1-ga5O_idV.mjs → local-d1-BM3p74mm.mjs} +6 -6
- package/dist/{login-D-Q4xw3Q.mjs → login-CZ2Cqa-D.mjs} +11 -11
- package/dist/login-DhK7o1oJ.mjs +2 -0
- package/dist/{logs-rd8J-OFh.mjs → logs-TihRcLTk.mjs} +5 -5
- package/dist/migrate-BgT-hmu8.mjs +2 -0
- package/dist/{migrate-NLsjBbuM.mjs → migrate-uFwojusJ.mjs} +69 -21
- package/dist/migration-handler-Cg0Y4EPu.mjs +470 -0
- package/dist/{migration-handler-DM4clYj5.d.mts → migration-handler-CwlEQUoo.d.mts} +17 -26
- package/dist/{mime-DxCznlJq.mjs → mime-srOklVVv.mjs} +92 -395
- package/dist/{node-DJicPvPj.mjs → node-DoKbo1SZ.mjs} +8 -24
- package/dist/{operator-args-BNsW5gfp.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
- package/dist/{operator-auth-AzVLbrr3.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
- package/dist/{operator-client-BQtzyG-g.mjs → operator-client-C-ROjk1I.mjs} +4 -4
- package/dist/{operator-cmd-B6f6Cg9Z.mjs → operator-cmd-C5lCctnc.mjs} +8 -8
- package/dist/operator-cmd-Cjk5DiRx.mjs +2 -0
- package/dist/{output-C50ag2r3.mjs → output-FNHKw5Ac.mjs} +36 -5
- package/dist/{package-json-DXfiT1jV.mjs → package-json-BjYqR-So.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +91 -5
- package/dist/pages/index.d.mts +1 -2
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.mjs +5 -83
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{platform-args-BoZkWQnJ.mjs → platform-args-C6Mb_I3a.mjs} +34 -58
- package/dist/platform-args-Cm7x-fot.mjs +2 -0
- package/dist/{platform-auth-config-n603OANg.mjs → platform-auth-config-CJmNkFT2.mjs} +10 -11
- package/dist/{platform-auth-protection-zxDr0hWW.mjs → platform-auth-protection-D5wvsI-Y.mjs} +36 -26
- package/dist/{platform-auth-recovery-tw9lgtgE.mjs → platform-auth-recovery-D_0I3n-1.mjs} +8 -9
- package/dist/{platform-cmd-C00YM14r.mjs → platform-cmd-Cuj4oUVo.mjs} +1 -1
- package/dist/{platform-cmd-B8-bCb7t.mjs → platform-cmd-DxxZO6e5.mjs} +17 -16
- package/dist/{platform-discovery-BC0HCKYt.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
- package/dist/{platform-domain-p0kobLV8.mjs → platform-domain-zLXnW1G_.mjs} +5 -5
- package/dist/{platform-lifecycle-D_QEY32D.mjs → platform-lifecycle-DOW-wLfx.mjs} +1398 -2043
- package/dist/{platform-lifecycle-vFqtNPPa.mjs → platform-lifecycle-_gfnjUBr.mjs} +1 -1
- package/dist/{platform-management-oi-SvI3f.mjs → platform-management-CYrLvTGH.mjs} +1 -1
- package/dist/{platform-management-BdYblvvE.mjs → platform-management-t7HKy4-U.mjs} +632 -124
- package/dist/{platform-plans-config-CjiFv5J4.mjs → platform-plans-config-CNH6zbPX.mjs} +15 -11
- package/dist/{platform-recovery-PvNS9Nl2.mjs → platform-recovery-DeucI7A9.mjs} +6 -9
- package/dist/{platform-registry-P387v42A.mjs → platform-registry-B9mWX9LO.mjs} +18 -19
- package/dist/{platform-setup-DVe42Ws7.mjs → platform-setup-CTf6MMT9.mjs} +19 -26
- package/dist/{plugin-inference-BlQbOL0P.mjs → plugin-inference-DsARdQKE.mjs} +18 -33
- package/dist/{prepare-Dq9hTIbo.mjs → prepare-C4zfwks4.mjs} +3 -3
- package/dist/{prepare-Do96654b.mjs → prepare-CSH9dKTI.mjs} +11 -13
- package/dist/prepare-dr9uxQSV.mjs +2 -0
- package/dist/{prerender-render-Ct20jftc.mjs → prerender-render-Bfsumdkv.mjs} +8 -2
- package/dist/prerender-render.d.mts +2 -0
- package/dist/prerender-render.mjs +2 -2
- package/dist/project-DiiOBZPF.mjs +2 -0
- package/dist/{project-cmd-ti8_yTcA.mjs → project-cmd-Dq75AXzy.mjs} +19 -19
- package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
- package/dist/{project-DQstYTxO.mjs → project-rqDnVsJN.mjs} +8 -4
- package/dist/{project-team-CDPE1Tsg.mjs → project-team-B3_QcStG.mjs} +6 -6
- package/dist/{project-token-CkZ1cN0Z.mjs → project-token-CvsRvv2I.mjs} +5 -5
- package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
- package/dist/{project-zero-trust-DdjLR61k.mjs → project-zero-trust-D1ICiwN_.mjs} +5 -5
- package/dist/{protocol-BPZaNqBo.d.mts → protocol-4H7V_3Os.d.mts} +1 -1
- package/dist/{protocol-CfaUwNs8.mjs → protocol-RNP0u7UY.mjs} +9 -3
- package/dist/{provision-BfaLiWbj.mjs → provision-DDh7ITVS.mjs} +118 -865
- package/dist/{requests-DFAqyYy8.mjs → requests-3CL3BuZh.mjs} +4 -4
- package/dist/resolve-project-B9Hr0D3n.mjs +2 -0
- package/dist/resolve-project-C_Cu7E8a.mjs +48 -0
- package/dist/{rollback-BKYXBduI.mjs → rollback-Ce1d_0J9.mjs} +7 -17
- package/dist/{route-types-CbtsIeFn.mjs → route-types-IrBuwJ7u.mjs} +35 -70
- package/dist/routing-assets-VkrKIbxE.mjs +139 -0
- package/dist/{runner-9wjsSZx-.mjs → runner-B5huK2eC.mjs} +1 -1
- package/dist/{runner-DMBKSrRk.mjs → runner-DcVDrzuR.mjs} +7 -28
- package/dist/{runner-mysql-CEzKtmFb.mjs → runner-mysql-CCtyI0p6.mjs} +4 -3
- package/dist/runner-mysql-CaJq-hd6.mjs +2 -0
- package/dist/runner-pg-BJhFZZG4.mjs +2 -0
- package/dist/{runner-pg-DV8p_zjA.mjs → runner-pg-CPd-CB_F.mjs} +1 -1
- package/dist/runtime/ai.mjs +9 -22
- package/dist/runtime/better-auth-mysql.d.mts +2 -5
- package/dist/runtime/better-auth-mysql.mjs +6 -31
- package/dist/runtime/better-auth-pg.d.mts +2 -5
- package/dist/runtime/better-auth-pg.mjs +6 -32
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +9 -19
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.d.mts +16 -0
- package/dist/runtime/durable.mjs +26 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +9 -23
- package/dist/runtime/email-protocol.d.mts +12 -0
- package/dist/runtime/email-protocol.mjs +2 -70
- package/dist/runtime/email.d.mts +1 -1
- package/dist/runtime/email.mjs +79 -221
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +12 -38
- package/dist/runtime/env.d.mts +1 -12
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +1 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler-mysql.d.mts +2 -2
- package/dist/runtime/migration-handler-mysql.mjs +3 -2
- package/dist/runtime/migration-handler-pg.d.mts +2 -2
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -2
- package/dist/runtime/migration-handler.mjs +2 -470
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.mjs +62 -62
- package/dist/runtime/remote/index.mjs +16 -77
- package/dist/runtime/routing.d.mts +1 -4
- package/dist/runtime/routing.mjs +82 -218
- package/dist/runtime/sandbox-container.d.mts +2 -2
- package/dist/runtime/sandbox-container.mjs +2 -2
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +13 -6
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -3
- package/dist/runtime/ws-server.mjs +6 -28
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-container-Bo0eiFKz.d.mts → sandbox-container-ChQRum-j.d.mts} +3 -1
- package/dist/{sandbox-container-C6ItmVuN.mjs → sandbox-container-DBKIqDEK.mjs} +12 -1
- package/dist/{sandbox-C5LFoJMf.d.mts → sandbox-q3waMc2T.d.mts} +1 -1
- package/dist/{scan-C3uDzz6J.mjs → scan-C0BMdmEd.mjs} +84 -7
- package/dist/{secret-BAt2KMmO.mjs → secret-B5J8bBsI.mjs} +62 -80
- package/dist/{serialize-BPvnNQuA.mjs → serialize-BtQyaYoC.mjs} +10 -4
- package/dist/{skills-BgVMvQdy.mjs → skills-BJsan98C.mjs} +2 -2
- package/dist/{subcommand-prompt-BSlnD1fI.mjs → subcommand-prompt-gQ-NDA-u.mjs} +38 -43
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-C9xtFOYR.mjs +2 -0
- package/dist/{validate-C9qJArv7.mjs → validate-CheZGRE7.mjs} +4 -8
- package/dist/version-metadata-DIrqEHQo.mjs +73 -0
- package/dist/{wrangler-D9KTuqnv.mjs → wrangler-BYs07Rxy.mjs} +119 -378
- package/dist/{ws-CChrrAU-.d.mts → ws-aKVYB-fA.d.mts} +1 -1
- package/dist/yarn-pnp-DLbEFMT0.mjs +92 -0
- package/docs/guide/auth.md +2 -0
- package/docs/guide/database/postgresql.md +2 -0
- package/docs/guide/database.md +2 -0
- package/docs/guide/deployment.md +2 -2
- package/docs/guide/durable-state.md +24 -0
- package/docs/guide/platform/administration/access.md +5 -1
- package/docs/guide/platform/administration/connected-apps.md +55 -0
- package/docs/guide/platform/installation/credentials.md +3 -1
- package/docs/guide/platform/installation/first-deployment.md +1 -1
- package/docs/guide/project-collaboration.md +1 -1
- package/docs/guide/quickstart.md +2 -0
- package/docs/guide/sandboxes.md +2 -0
- package/docs/reference/api/deploy.md +23 -0
- package/docs/reference/api/pages.md +2 -0
- package/docs/reference/api.md +2 -1
- package/docs/reference/cli/auth.md +1 -1
- package/docs/reference/cli/database.md +9 -3
- package/docs/reference/cli/deploy.md +1 -1
- package/docs/reference/cli/platform-installation.md +1 -1
- package/docs/reference/cli/setup.md +2 -0
- package/package.json +14 -17
- package/skills/void/SKILL.md +4 -2
- package/dist/auth-BgX2qYSY.mjs +0 -2
- package/dist/cf-build-output-H9a97vME.mjs +0 -2
- package/dist/client-By4JjMw_.mjs +0 -2
- package/dist/collect-DLyFDiKW.mjs +0 -2
- package/dist/config-5r-YpMC-.mjs +0 -2
- package/dist/config-B_ggY-IO.mjs +0 -89
- package/dist/config-BtSFvXZx.mjs +0 -2
- package/dist/config-write-AHGesphx.mjs +0 -61
- package/dist/deploy-BsEvnlJl.mjs +0 -10455
- package/dist/deploy-C1d-YTfp.mjs +0 -2
- package/dist/dev-inbox-CK-UuPob.mjs +0 -297
- package/dist/discover-EDUf6JJw.mjs +0 -2
- package/dist/dist-_UUlL6bg.mjs +0 -2
- package/dist/env-validation-Dxdx_5wo.mjs +0 -951
- package/dist/gen-dA9hW7AV.mjs +0 -2
- package/dist/head-client-DzmJGN4C.mjs +0 -90
- package/dist/help-DzKUrQvk.mjs +0 -2
- package/dist/login-Dc-wuTDq.mjs +0 -2
- package/dist/migrate-BHp07yJE.mjs +0 -2
- package/dist/operator-cmd-Cwn50lOV.mjs +0 -2
- package/dist/pages/head-client.d.mts +0 -13
- package/dist/pages/head-client.mjs +0 -2
- package/dist/platform-args-DYgITk0D.mjs +0 -2
- package/dist/prepare-DRUV-g3X.mjs +0 -2
- package/dist/project-BiaPQ7ur.mjs +0 -2
- package/dist/provision-Wu9ZBk9L.mjs +0 -2
- package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
- package/dist/resolve-project-CP8rZs_p.mjs +0 -28
- package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
- package/dist/runner-pg-BGYRFdRp.mjs +0 -2
- package/dist/runtime/env-helpers.d.mts +0 -2
- package/dist/runtime/env-helpers.mjs +0 -2
- package/dist/validate-BJr9LfXy.mjs +0 -2
- package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
4
|
-
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-
|
|
2
|
+
import { m as printSuccess } from "./output-FNHKw5Ac.mjs";
|
|
3
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
|
|
4
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
|
|
5
5
|
import { stripVTControlCharacters } from "node:util";
|
|
6
6
|
import { PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanId } from "@void/platform/plans";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
@@ -23,6 +23,14 @@ function limitValue(value, key) {
|
|
|
23
23
|
if (value === 0 && key === "buildTimeoutMinutes") return "platform maximum (60 minutes)";
|
|
24
24
|
return value === 0 ? "unlimited" : value.toLocaleString("en-US");
|
|
25
25
|
}
|
|
26
|
+
function shortSlugsLabel(allowed) {
|
|
27
|
+
return allowed ? "allowed" : "not allowed";
|
|
28
|
+
}
|
|
29
|
+
function writePlanDiff(from, to, write) {
|
|
30
|
+
if (from.buildInstanceType !== to.buildInstanceType) write(`Build size: ${from.buildInstanceType} → ${to.buildInstanceType}`);
|
|
31
|
+
if (from.allowShortSlugs !== to.allowShortSlugs) write(`Short project slugs: ${shortSlugsLabel(from.allowShortSlugs)} → ${shortSlugsLabel(to.allowShortSlugs)}`);
|
|
32
|
+
for (const key of PLAN_EDITABLE_LIMIT_KEYS) if (from.limits[key] !== to.limits[key]) write(`${limitLabels[key]}: ${limitValue(from.limits[key], key)} → ${limitValue(to.limits[key], key)}`);
|
|
33
|
+
}
|
|
26
34
|
function showListing(listing, json) {
|
|
27
35
|
if (json) {
|
|
28
36
|
print(listing);
|
|
@@ -47,23 +55,19 @@ function showPreview(preview, before, write = console.error) {
|
|
|
47
55
|
if (!previous) {
|
|
48
56
|
write(`Add ${label(plan)}; build size ${plan.buildInstanceType}`);
|
|
49
57
|
for (const key of PLAN_EDITABLE_LIMIT_KEYS) write(` ${limitLabels[key]}: ${limitValue(plan.limits[key], key)}`);
|
|
50
|
-
write(` Short project slugs: ${plan.allowShortSlugs
|
|
58
|
+
write(` Short project slugs: ${shortSlugsLabel(plan.allowShortSlugs)}`);
|
|
51
59
|
continue;
|
|
52
60
|
}
|
|
53
61
|
if (previous.name !== plan.name) write(`Name: ${previous.name} → ${plan.name}`);
|
|
54
62
|
if (previous.archived !== plan.archived) write(`${plan.id}: ${plan.archived ? "archive for new assignments" : "restore assignments"}`);
|
|
55
|
-
|
|
56
|
-
if (previous.allowShortSlugs !== plan.allowShortSlugs) write(`Short project slugs: ${previous.allowShortSlugs ? "allowed" : "not allowed"} → ${plan.allowShortSlugs ? "allowed" : "not allowed"}`);
|
|
57
|
-
for (const key of PLAN_EDITABLE_LIMIT_KEYS) if (previous.limits[key] !== plan.limits[key]) write(`${limitLabels[key]}: ${limitValue(previous.limits[key], key)} → ${limitValue(plan.limits[key], key)}`);
|
|
63
|
+
writePlanDiff(previous, plan, write);
|
|
58
64
|
}
|
|
59
65
|
for (const plan of before.plans) if (!after.plans.some((entry) => entry.id === plan.id)) {
|
|
60
66
|
write(`Remove ${label(plan)}`);
|
|
61
67
|
const replacement = after.plans.find((entry) => entry.id === preview.replacementPlanId);
|
|
62
68
|
if (replacement) {
|
|
63
69
|
write(`Move accounts to ${label(replacement)}`);
|
|
64
|
-
|
|
65
|
-
if (plan.allowShortSlugs !== replacement.allowShortSlugs) write(`Short project slugs: ${plan.allowShortSlugs ? "allowed" : "not allowed"} → ${replacement.allowShortSlugs ? "allowed" : "not allowed"}`);
|
|
66
|
-
for (const key of PLAN_EDITABLE_LIMIT_KEYS) if (plan.limits[key] !== replacement.limits[key]) write(`${limitLabels[key]}: ${limitValue(plan.limits[key], key)} → ${limitValue(replacement.limits[key], key)}`);
|
|
70
|
+
writePlanDiff(plan, replacement, write);
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
73
|
for (const account of preview.overLimitAccounts ?? []) write(`Already above proposed limits: ${stripVTControlCharacters(account.login)} (${account.id}): ${account.reasons.join(", ")}`);
|
|
@@ -313,7 +317,7 @@ async function runPlatformPlansConfig(args) {
|
|
|
313
317
|
const plan = result.plan;
|
|
314
318
|
console.log(`${label(plan)}${result.default ? " — default for new accounts" : ""}`);
|
|
315
319
|
console.log(`Accounts: ${result.accounts}; build size: ${plan.buildInstanceType}`);
|
|
316
|
-
console.log(`Short project slugs: ${plan.allowShortSlugs
|
|
320
|
+
console.log(`Short project slugs: ${shortSlugsLabel(plan.allowShortSlugs)}`);
|
|
317
321
|
for (const key of PLAN_EDITABLE_LIMIT_KEYS) console.log(`${limitLabels[key]}: ${limitValue(plan.limits[key], key)}`);
|
|
318
322
|
}
|
|
319
323
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-
|
|
2
|
-
import { t as cfAccessHeaders } from "./cf-access-
|
|
3
|
-
import {
|
|
4
|
-
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
1
|
+
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
|
+
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
3
|
+
import { a as REMOTE_INSTALLATION_MANIFEST_KEY, x as createPlatformInstallPlan } from "./platform-lifecycle-DOW-wLfx.mjs";
|
|
4
|
+
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-t7HKy4-U.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
//#region src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
8
|
-
if (!(await client.listAccounts()).some((account) => account.id === accountId)) throw new Error(`platform: Cloudflare account ${JSON.stringify(accountId)} is unavailable.`);
|
|
9
8
|
const namespaces = await client.listKvNamespaces(accountId);
|
|
10
9
|
const recovered = [];
|
|
11
10
|
for (const namespace of namespaces) {
|
|
@@ -51,12 +50,10 @@ async function recoverPlatformInstallations(client, accountId, verifyEndpoint =
|
|
|
51
50
|
if (isPlatformManifestMonotonicExtension(manifest, collision)) {
|
|
52
51
|
await verifyPlatformInstallationOwnership(client, collision);
|
|
53
52
|
manifest = collision;
|
|
54
|
-
} else if (isPlatformManifestMonotonicExtension(collision, manifest))
|
|
55
|
-
else throw new Error(`platform: Local installation ${manifest.id} differs from its remote checkpoint. Resolve or remove the local record before discovery; it was not overwritten.`);
|
|
53
|
+
} else if (!isPlatformManifestMonotonicExtension(collision, manifest)) throw new Error(`platform: Local installation ${manifest.id} differs from its remote checkpoint. Resolve or remove the local record before discovery; it was not overwritten.`);
|
|
56
54
|
}
|
|
57
55
|
manifest = reconcileRecoveredEndpoints(manifest, plan);
|
|
58
|
-
if (!collision) writeInstallationManifest(manifest);
|
|
59
|
-
else if (JSON.stringify(collision) !== JSON.stringify(manifest)) writeInstallationManifest(manifest);
|
|
56
|
+
if (!collision || JSON.stringify(collision) !== JSON.stringify(manifest)) writeInstallationManifest(manifest);
|
|
60
57
|
if (manifest.endpoints.apiUrl !== null && manifest.endpoints.proxyUrl !== null) savePlatformConnection({
|
|
61
58
|
accountId: manifest.account.id,
|
|
62
59
|
apiUrl: manifest.endpoints.apiUrl,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as join,
|
|
2
|
-
import {
|
|
1
|
+
import { a as join, c as resolve } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { t as writeFileAtomic } from "./atomic-write-Dq6R0BPN.mjs";
|
|
3
|
+
import { closeSync, mkdirSync, openSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
3
4
|
import { parsePlatformInstallationManifest } from "@void/platform";
|
|
4
5
|
import { createCipheriv, createDecipheriv, createHash, randomBytes } from "node:crypto";
|
|
5
6
|
import { homedir, hostname } from "node:os";
|
|
@@ -28,10 +29,13 @@ function deleteKeyringPassword(service, account) {
|
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/cli/platform-registry.ts
|
|
34
|
+
const PLATFORM_REGISTRY_SCHEMA_VERSION = 1;
|
|
31
35
|
const DEFAULT_REGISTRY = {
|
|
32
36
|
activeConnectionId: null,
|
|
33
37
|
connections: [],
|
|
34
|
-
schemaVersion:
|
|
38
|
+
schemaVersion: PLATFORM_REGISTRY_SCHEMA_VERSION
|
|
35
39
|
};
|
|
36
40
|
const PLATFORM_RECOVERY_KEYRING_SERVICE = "dev.void.cli.platform";
|
|
37
41
|
const PLATFORM_RECOVERY_ENVELOPE_VERSION = 1;
|
|
@@ -45,7 +49,11 @@ function normalizePlatformApiUrl(value) {
|
|
|
45
49
|
} catch {
|
|
46
50
|
throw new Error(`platform: Invalid platform URL ${JSON.stringify(value)}.`);
|
|
47
51
|
}
|
|
48
|
-
if (!(url.protocol === "http:" &&
|
|
52
|
+
if (!(url.protocol === "http:" && [
|
|
53
|
+
"localhost",
|
|
54
|
+
"127.0.0.1",
|
|
55
|
+
"[::1]"
|
|
56
|
+
].includes(url.hostname)) && url.protocol !== "https:" || url.username || url.password) throw new Error("platform: Platform URLs must use HTTPS and must not contain credentials.");
|
|
49
57
|
if (url.search || url.hash) throw new Error("platform: Platform URLs must not contain query parameters or fragments.");
|
|
50
58
|
if (url.pathname !== "/" && url.pathname !== "") throw new Error("platform: Platform URLs must not contain a path.");
|
|
51
59
|
return url.origin;
|
|
@@ -84,12 +92,12 @@ function readRegistry(directory) {
|
|
|
84
92
|
const parsed = JSON.parse(readFileSync(join(directory, "registry.json"), "utf8"));
|
|
85
93
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("registry must be an object");
|
|
86
94
|
const value = parsed;
|
|
87
|
-
if (value.schemaVersion !==
|
|
95
|
+
if (value.schemaVersion !== PLATFORM_REGISTRY_SCHEMA_VERSION || !Array.isArray(value.connections)) throw new Error("unsupported schema");
|
|
88
96
|
const connections = value.connections.map(parseConnection);
|
|
89
97
|
return {
|
|
90
98
|
activeConnectionId: typeof value.activeConnectionId === "string" && connections.some((connection) => connection.id === value.activeConnectionId) ? value.activeConnectionId : null,
|
|
91
99
|
connections,
|
|
92
|
-
schemaVersion:
|
|
100
|
+
schemaVersion: PLATFORM_REGISTRY_SCHEMA_VERSION
|
|
93
101
|
};
|
|
94
102
|
} catch (error) {
|
|
95
103
|
if (error.code === "ENOENT") return DEFAULT_REGISTRY;
|
|
@@ -119,16 +127,7 @@ function withRegistryLock(directory, operation) {
|
|
|
119
127
|
}
|
|
120
128
|
}
|
|
121
129
|
function writeJsonAtomically(path, value) {
|
|
122
|
-
|
|
123
|
-
try {
|
|
124
|
-
writeFileSync(temporary, `${JSON.stringify(value, null, 2)}\n`, {
|
|
125
|
-
mode: 384,
|
|
126
|
-
flag: "wx"
|
|
127
|
-
});
|
|
128
|
-
renameSync(temporary, path);
|
|
129
|
-
} finally {
|
|
130
|
-
rmSync(temporary, { force: true });
|
|
131
|
-
}
|
|
130
|
+
writeFileAtomic(path, `${JSON.stringify(value, null, 2)}\n`, 384);
|
|
132
131
|
}
|
|
133
132
|
function acquirePlatformLifecycleLock(accountId, installationSlug, directory = platformRegistryDirectory()) {
|
|
134
133
|
if (!/^[A-Za-z0-9_-]+$/.test(accountId) || !/^[a-z0-9][a-z0-9-]{0,79}$/.test(installationSlug)) throw new Error("platform: Invalid lifecycle lock identity.");
|
|
@@ -219,7 +218,7 @@ function savePlatformConnection(input, directory = platformRegistryDirectory())
|
|
|
219
218
|
writeJsonAtomically(join(directory, "registry.json"), {
|
|
220
219
|
activeConnectionId: id,
|
|
221
220
|
connections,
|
|
222
|
-
schemaVersion:
|
|
221
|
+
schemaVersion: PLATFORM_REGISTRY_SCHEMA_VERSION
|
|
223
222
|
});
|
|
224
223
|
return connection;
|
|
225
224
|
});
|
|
@@ -237,7 +236,7 @@ function selectPlatformConnection(selector, directory = platformRegistryDirector
|
|
|
237
236
|
writeJsonAtomically(join(directory, "registry.json"), {
|
|
238
237
|
activeConnectionId: selected.id,
|
|
239
238
|
connections,
|
|
240
|
-
schemaVersion:
|
|
239
|
+
schemaVersion: PLATFORM_REGISTRY_SCHEMA_VERSION
|
|
241
240
|
});
|
|
242
241
|
return selected;
|
|
243
242
|
});
|
|
@@ -430,7 +429,7 @@ function removePlatformConnectionForInstallation(installationId, directory = pla
|
|
|
430
429
|
writeJsonAtomically(join(directory, "registry.json"), {
|
|
431
430
|
activeConnectionId: current.activeConnectionId && connections.some((connection) => connection.id === current.activeConnectionId) ? current.activeConnectionId : connections[0]?.id ?? null,
|
|
432
431
|
connections,
|
|
433
|
-
schemaVersion:
|
|
432
|
+
schemaVersion: PLATFORM_REGISTRY_SCHEMA_VERSION
|
|
434
433
|
});
|
|
435
434
|
});
|
|
436
435
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { u as openBrowser } from "./auth-
|
|
1
|
+
import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
2
2
|
import { L as log, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { execFile } from "node:child_process";
|
|
3
|
+
import { f as import_picocolors, s as formatLink } from "./output-FNHKw5Ac.mjs";
|
|
5
4
|
//#region src/cli/platform-setup.ts
|
|
6
5
|
/** Return a prompt answer, or stop the platform command when the prompt was cancelled. */
|
|
7
6
|
function platformPromptAnswer(value) {
|
|
8
7
|
if (isCancel(value) || typeof value === "symbol") throw new Error("platform: Cancelled.");
|
|
9
8
|
return value;
|
|
10
9
|
}
|
|
11
|
-
function platformSetupLink(page
|
|
12
|
-
return
|
|
10
|
+
function platformSetupLink(page) {
|
|
11
|
+
return formatLink(import_picocolors.default.underline(page.title), page.url);
|
|
13
12
|
}
|
|
14
13
|
function platformSetupFieldHelp(key) {
|
|
15
14
|
const docs = (page, section, title) => platformSetupLink({
|
|
@@ -29,15 +28,6 @@ function platformSetupFieldHelp(key) {
|
|
|
29
28
|
default: return;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
function supportsSetupLinks() {
|
|
33
|
-
return !!process.stdout.isTTY && ([
|
|
34
|
-
"ghostty",
|
|
35
|
-
"iTerm.app",
|
|
36
|
-
"WezTerm",
|
|
37
|
-
"vscode",
|
|
38
|
-
"WarpTerminal"
|
|
39
|
-
].includes(process.env.TERM_PROGRAM ?? "") || !!process.env.WT_SESSION || !!process.env.VTE_VERSION || !!process.env.KONSOLE_VERSION || process.env.TERM === "xterm-kitty");
|
|
40
|
-
}
|
|
41
31
|
/** Dashboard keys use permission-catalog labels, which can differ from product names. */
|
|
42
32
|
function platformAccountTokenPermissions(includeAiGateway) {
|
|
43
33
|
return [
|
|
@@ -94,14 +84,11 @@ function specifiedDomainsInstruction(zones) {
|
|
|
94
84
|
function plansZoneCreation(plan) {
|
|
95
85
|
return plan.actions.some((action) => action.kind === "zone" && action.action === "create");
|
|
96
86
|
}
|
|
97
|
-
function platformManagementSetupPage(plan, options
|
|
87
|
+
function platformManagementSetupPage(plan, options) {
|
|
98
88
|
const createsZone = plansZoneCreation(plan);
|
|
99
89
|
const zoneName = plan.deployment.application.zoneName;
|
|
100
90
|
const apiHostname = plan.deployment.controlPlane.apiHostname;
|
|
101
|
-
const access = options
|
|
102
|
-
protection: !!plan.deployment.authentication.accessProtection,
|
|
103
|
-
readOnly: false
|
|
104
|
-
} : void 0);
|
|
91
|
+
const { access } = options;
|
|
105
92
|
const zones = [...zoneName ? [zoneName] : [], ...apiHostname && apiHostname !== zoneName && !apiHostname.endsWith(`.${zoneName}`) ? [`the zone for ${apiHostname}`] : []];
|
|
106
93
|
const accessLevel = access && access.readOnly ? "read" : "edit";
|
|
107
94
|
const appAccess = !!plan.deployment.appAccess;
|
|
@@ -167,6 +154,13 @@ function platformSetupPages(plan) {
|
|
|
167
154
|
key: "ssl_and_certificates",
|
|
168
155
|
type: "edit"
|
|
169
156
|
}] : [],
|
|
157
|
+
...plan.deployment.capabilities.sandbox ? [{
|
|
158
|
+
key: "containers",
|
|
159
|
+
type: "edit"
|
|
160
|
+
}, {
|
|
161
|
+
key: "cloudchamber",
|
|
162
|
+
type: "edit"
|
|
163
|
+
}] : [],
|
|
170
164
|
...plan.deployment.capabilities.email ? [
|
|
171
165
|
{
|
|
172
166
|
key: "zone",
|
|
@@ -211,13 +205,12 @@ function platformSetupPages(plan) {
|
|
|
211
205
|
title: "R2 upload token",
|
|
212
206
|
url: "https://dash.cloudflare.com/?" + new URLSearchParams({
|
|
213
207
|
to: "/" + plan.account.id + "/r2/api-tokens/create",
|
|
214
|
-
type: "account"
|
|
208
|
+
type: "account",
|
|
209
|
+
name: plan.deployment.displayName + " Uploads",
|
|
210
|
+
permission: "object-write",
|
|
211
|
+
bucketScope: "all"
|
|
215
212
|
}),
|
|
216
|
-
instructions: [
|
|
217
|
-
"Select Object Read & Write.",
|
|
218
|
-
"Keep Apply to all buckets in this account selected.",
|
|
219
|
-
"Create the token, then copy the Access Key ID and Secret Access Key into the CLI."
|
|
220
|
-
].join("\n")
|
|
213
|
+
instructions: ["Review the preselected Object Read & Write access to all buckets in this account.", "Create the token, then copy the Access Key ID and Secret Access Key into the CLI."].join("\n")
|
|
221
214
|
}
|
|
222
215
|
};
|
|
223
216
|
}
|
|
@@ -290,7 +283,7 @@ function openPlatformSetupPage(page, dependencies = {}) {
|
|
|
290
283
|
title: "Open " + page.title
|
|
291
284
|
}));
|
|
292
285
|
if (dependencies.interactive ?? process.stdin.isTTY === true) try {
|
|
293
|
-
(dependencies.open ??
|
|
286
|
+
(dependencies.open ?? openBrowser)(page.url);
|
|
294
287
|
} catch {
|
|
295
288
|
log.info("Could not open the browser. Use the link above.");
|
|
296
289
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as join,
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { n as globSync
|
|
1
|
+
import { a as join, l as toSlash, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
|
|
3
|
+
import { n as globSync } from "./dist-Bn8Kodjp.mjs";
|
|
4
4
|
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-CPGPjb0V.mjs";
|
|
5
5
|
import { a as staticLiteral, n as parseRouteFilename, o as unwrapStaticExpression, r as parseWebSocketFilename, t as isRouteEnabledForEnvironment } from "./parse-filename-CUbj-1MP.mjs";
|
|
6
6
|
import { n as resourceNameWords, t as isResourceName } from "./resource-name-C7LVpcRm.mjs";
|
|
7
|
-
import { r as getSsrServerEntryPath } from "./entry-
|
|
7
|
+
import { r as getSsrServerEntryPath } from "./entry-ehmBvs5w.mjs";
|
|
8
8
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
9
|
import { parseSync } from "vite";
|
|
10
10
|
//#region src/application-features.ts
|
|
@@ -28,6 +28,12 @@ function needsApplicationDatabase(bindings, migrationCount) {
|
|
|
28
28
|
return bindings.needsD1 || bindings.needsAuth || migrationCount > 0;
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
|
+
//#region src/shared/convention-files.ts
|
|
32
|
+
/** Handler files under `dir`, relative to it, skipping paths with a `_`-prefixed segment. */
|
|
33
|
+
function listConventionFiles(dir) {
|
|
34
|
+
return globSync("**/*.{ts,mts,js,mjs}", { cwd: dir }).filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_")));
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
31
37
|
//#region src/shared/resource-definition.ts
|
|
32
38
|
/** Inspect default helper definitions without running application code. */
|
|
33
39
|
function readResourceDefinition(filename, source, helpers) {
|
|
@@ -52,7 +58,7 @@ function readResourceDefinition(filename, source, helpers) {
|
|
|
52
58
|
if (statement.type === "ImportDeclaration") {
|
|
53
59
|
const declaration = statement;
|
|
54
60
|
const source = declaration.source.value;
|
|
55
|
-
const supported = source === "void/ws" ? /* @__PURE__ */ new Set(["defineRoom", "defineWebSocket"]) : source === "void/durable" ? /* @__PURE__ */ new Set(["defineDurableState"]) : /* @__PURE__ */ new Set();
|
|
61
|
+
const supported = source === "void/ws" ? /* @__PURE__ */ new Set(["defineRoom", "defineWebSocket"]) : source === "void/durable" ? /* @__PURE__ */ new Set(["defineDurableState", "defineDurableObject"]) : /* @__PURE__ */ new Set();
|
|
56
62
|
for (const specifier of declaration.specifiers ?? []) {
|
|
57
63
|
const local = specifier.local;
|
|
58
64
|
recordBindings(local);
|
|
@@ -476,12 +482,6 @@ function mergeBindings(bindings) {
|
|
|
476
482
|
}
|
|
477
483
|
//#endregion
|
|
478
484
|
//#region src/router/websocket.ts
|
|
479
|
-
const HANDLER_EXTENSIONS = [
|
|
480
|
-
"ts",
|
|
481
|
-
"mts",
|
|
482
|
-
"js",
|
|
483
|
-
"mjs"
|
|
484
|
-
];
|
|
485
485
|
const WEBSOCKET_ROUTE_RE = /(?:\.(?:dev|prod))?\.ws\.(?:ts|mts|js|mjs)$/;
|
|
486
486
|
function isWebSocketRouteFile(filePath) {
|
|
487
487
|
return WEBSOCKET_ROUTE_RE.test(filePath.replace(/\\/g, "/"));
|
|
@@ -530,7 +530,7 @@ function buildWebSocketRoute(root, filePath, paths = readProjectPaths(root)) {
|
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
532
|
function parseWebSocketFiles(root, files, paths = readProjectPaths(root), environment) {
|
|
533
|
-
const routes = files.filter((f) => isWebSocketRouteFile(f)).filter((
|
|
533
|
+
const routes = files.filter((f) => isWebSocketRouteFile(f)).filter((filePath) => isRouteEnabledForEnvironment(parseWebSocketFilename(filePath), environment)).map((filePath) => buildWebSocketRoute(root, filePath, paths)).sort((a, b) => {
|
|
534
534
|
if (a.catchAll !== b.catchAll) return a.catchAll ? 1 : -1;
|
|
535
535
|
return a.pattern.localeCompare(b.pattern);
|
|
536
536
|
});
|
|
@@ -543,25 +543,8 @@ function parseWebSocketFiles(root, files, paths = readProjectPaths(root), enviro
|
|
|
543
543
|
}
|
|
544
544
|
return routes;
|
|
545
545
|
}
|
|
546
|
-
async function scanWebSocketRoutes(root, paths = readProjectPaths(root), environment) {
|
|
547
|
-
const pattern = `**/*.{${HANDLER_EXTENSIONS.join(",")}}`;
|
|
548
|
-
return parseWebSocketFiles(root, await glob(pattern, {
|
|
549
|
-
cwd: paths.routesDir,
|
|
550
|
-
absolute: false
|
|
551
|
-
}).catch(() => []), paths, environment);
|
|
552
|
-
}
|
|
553
546
|
function scanWebSocketRoutesSync(root, paths = readProjectPaths(root), environment) {
|
|
554
|
-
|
|
555
|
-
let files;
|
|
556
|
-
try {
|
|
557
|
-
files = globSync(pattern, {
|
|
558
|
-
cwd: paths.routesDir,
|
|
559
|
-
absolute: false
|
|
560
|
-
});
|
|
561
|
-
} catch {
|
|
562
|
-
files = [];
|
|
563
|
-
}
|
|
564
|
-
return parseWebSocketFiles(root, files, paths, environment);
|
|
547
|
+
return parseWebSocketFiles(root, listConventionFiles(paths.routesDir), paths, environment);
|
|
565
548
|
}
|
|
566
549
|
function isWebSocketPatternFile(filePath) {
|
|
567
550
|
return isWebSocketRouteFile(filePath);
|
|
@@ -577,7 +560,8 @@ const FRAMEWORK_SCAN_DIRS = [
|
|
|
577
560
|
"routes",
|
|
578
561
|
"server",
|
|
579
562
|
"crons",
|
|
580
|
-
"queues"
|
|
563
|
+
"queues",
|
|
564
|
+
"durable-objects"
|
|
581
565
|
];
|
|
582
566
|
/**
|
|
583
567
|
* Directories to scan for binding inference in Void app mode.
|
|
@@ -593,6 +577,7 @@ const DEFAULT_SCAN_DIRS = [
|
|
|
593
577
|
"pages",
|
|
594
578
|
"crons",
|
|
595
579
|
"email",
|
|
580
|
+
"durable-objects",
|
|
596
581
|
"src"
|
|
597
582
|
];
|
|
598
583
|
/**
|
|
@@ -673,7 +658,7 @@ function inferBindingsFromFile(file, code) {
|
|
|
673
658
|
*/
|
|
674
659
|
function inferProjectBindings(root, options, scanDirs) {
|
|
675
660
|
const paths = options?.paths ?? readProjectPaths(root);
|
|
676
|
-
const dirs = scanDirs ?? (paths.sourceDir ? [paths.sourceDir] : DEFAULT_SCAN_DIRS);
|
|
661
|
+
const dirs = scanDirs ?? (paths.sourceDir ? [paths.sourceDir, "durable-objects"] : DEFAULT_SCAN_DIRS);
|
|
677
662
|
const allBindings = [];
|
|
678
663
|
const scannedFiles = /* @__PURE__ */ new Set();
|
|
679
664
|
const routesPrefix = `${toSlash(paths.routesDir).replace(/\/$/, "")}/`;
|
|
@@ -722,4 +707,4 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
722
707
|
return applyBindingOverrides(mergeBindings(allBindings), options?.bindings);
|
|
723
708
|
}
|
|
724
709
|
//#endregion
|
|
725
|
-
export { deriveWebSocketClassNameFromName as a,
|
|
710
|
+
export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutesSync as c, walk as d, readResourceDefinition as f, needsApplicationDatabase as h, inferProjectBindings as i, inferBindingsFromSource as l, applyBindingOverrides as m, FRAMEWORK_SCAN_DIRS as n, inferWebSocketResourceName as o, listConventionFiles as p, detectFramework as r, isWebSocketPatternFile as s, DEFAULT_SCAN_DIRS as t, staticModuleReferences as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { L as log } from "./dist-D3m88sjf.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as prepareProject } from "./prepare-
|
|
2
|
+
import { m as printSuccess, p as note } from "./output-FNHKw5Ac.mjs";
|
|
3
|
+
import { t as prepareProject } from "./prepare-CSH9dKTI.mjs";
|
|
4
4
|
//#region src/cli/prepare.ts
|
|
5
|
-
async function runPrepareCommand(root
|
|
5
|
+
async function runPrepareCommand(root) {
|
|
6
6
|
console.log();
|
|
7
7
|
const result = await prepareProject(root);
|
|
8
8
|
if (result.written.length > 0) note(result.written.join("\n"), "Wrote");
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { a as join } from "./dist-
|
|
2
|
-
import { n as loadVoidAuthConfig } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-
|
|
5
|
-
import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-
|
|
6
|
-
import { t as discoverSchema } from "./discover-
|
|
7
|
-
import { o as loadLocalEnv } from "./env-
|
|
8
|
-
import {
|
|
9
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
1
|
+
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { n as loadVoidAuthConfig } from "./config-D0GY5ItR.mjs";
|
|
3
|
+
import { d as readConfig } from "./config-Bx_1SpnO.mjs";
|
|
4
|
+
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-bveqhlYA.mjs";
|
|
5
|
+
import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-IrBuwJ7u.mjs";
|
|
6
|
+
import { t as discoverSchema } from "./discover-D2PGT63u.mjs";
|
|
7
|
+
import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
|
|
8
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-DS2_y4X8.mjs";
|
|
9
|
+
import { t as analyzeApplication } from "./application-routing-Dy589Vgn.mjs";
|
|
10
10
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-CF84FOVM.mjs";
|
|
11
|
-
import { existsSync,
|
|
11
|
+
import { existsSync, rmSync } from "node:fs";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
//#region src/codegen/prepare.ts
|
|
14
14
|
function writeGeneratedFile(outDir, fileName, content, written) {
|
|
15
|
-
mkdirSync(outDir, { recursive: true });
|
|
16
15
|
if (writeFileIfChanged(join(outDir, fileName), content)) written.push(join(".void", fileName));
|
|
17
16
|
}
|
|
18
17
|
function removeGeneratedFile(outDir, fileName, removed) {
|
|
@@ -27,8 +26,7 @@ async function prepareProject(root) {
|
|
|
27
26
|
const outDir = join(root, ".void");
|
|
28
27
|
const written = [];
|
|
29
28
|
const removed = [];
|
|
30
|
-
|
|
31
|
-
const envFile = findEnvFile(root);
|
|
29
|
+
const envFile = findEnvFileForPaths(root, paths);
|
|
32
30
|
if (envFile) {
|
|
33
31
|
const { dts } = generateEnvTypes(envFile, outDir);
|
|
34
32
|
writeGeneratedFile(outDir, "env.d.ts", dts, written);
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute,
|
|
1
|
+
import { a as join, i as isAbsolute, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
3
3
|
//#region src/prerender-render.ts
|
|
4
4
|
function outputFileForPath(path) {
|
|
5
5
|
return path === "/" ? "index.html" : `${path.slice(1)}.html`;
|
|
6
6
|
}
|
|
7
|
+
async function readPrerenderPathsResponse(response) {
|
|
8
|
+
if (!response.ok) throw new Error(`prerender: Failed to collect prerender paths. HTTP ${response.status}.`);
|
|
9
|
+
const payload = await response.json();
|
|
10
|
+
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.");
|
|
11
|
+
return payload.paths;
|
|
12
|
+
}
|
|
7
13
|
function pageDataFileForPath(path) {
|
|
8
14
|
return path === "/" ? "_void/pages/index.json" : `_void/pages/${path.slice(1)}.json`;
|
|
9
15
|
}
|
|
@@ -122,4 +128,4 @@ async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData,
|
|
|
122
128
|
};
|
|
123
129
|
}
|
|
124
130
|
//#endregion
|
|
125
|
-
export { renderPrerenderPaths as t };
|
|
131
|
+
export { readPrerenderPathsResponse as n, renderPrerenderPaths as r, outputFileForPath as t };
|
|
@@ -6,6 +6,8 @@ export type PrerenderResult = {
|
|
|
6
6
|
error: string;
|
|
7
7
|
}>;
|
|
8
8
|
};
|
|
9
|
+
export declare function outputFileForPath(path: string): string;
|
|
10
|
+
export declare function readPrerenderPathsResponse(response: Response): Promise<Array<string>>;
|
|
9
11
|
/** Shared renderer for local Workers and the isolated Node prerender child. */
|
|
10
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>;
|
|
11
13
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { renderPrerenderPaths };
|
|
1
|
+
import { n as readPrerenderPathsResponse, r as renderPrerenderPaths, t as outputFileForPath } from "./prerender-render-Bfsumdkv.mjs";
|
|
2
|
+
export { outputFileForPath, readPrerenderPathsResponse, renderPrerenderPaths };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as readDeploymentPlatform } from "./project-
|
|
2
|
-
import { c as getToken, s as getSiteDomain } from "./auth-
|
|
1
|
+
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-D3m88sjf.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-FNHKw5Ac.mjs";
|
|
5
|
+
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
@@ -27,7 +27,7 @@ async function runProjectsCommand(root) {
|
|
|
27
27
|
const typeWidth = Math.max(4, ...rows.map((r) => r.appType.length));
|
|
28
28
|
const prefix = tablePrefix();
|
|
29
29
|
const header = `${prefix}${dim(`${"slug".padEnd(slugWidth)} ${"role".padEnd(roleWidth)} ${"type".padEnd(typeWidth)} url`)}`;
|
|
30
|
-
const lines = rows.map((row) => `${prefix}${import_picocolors.default.green(row.slug)}${"".padEnd(slugWidth - row.slug.length)} ${row.role.padEnd(roleWidth)} ${row.appType.padEnd(typeWidth)} ${row.url}`);
|
|
30
|
+
const lines = rows.map((row) => `${prefix}${import_picocolors.default.green(row.slug)}${"".padEnd(slugWidth - row.slug.length)} ${row.role.padEnd(roleWidth)} ${row.appType.padEnd(typeWidth)} ${formatUrl(row.url)}`);
|
|
31
31
|
console.log(prefix);
|
|
32
32
|
console.log(header);
|
|
33
33
|
for (const line of lines) console.log(line);
|
|
@@ -38,77 +38,77 @@ async function runProjectsCommand(root) {
|
|
|
38
38
|
async function runProjectCommand(root, args) {
|
|
39
39
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
40
40
|
if (args.subcommand === "status") {
|
|
41
|
-
const { runListCommand } = await import("./list-
|
|
41
|
+
const { runListCommand } = await import("./list-CuWeOnzk.mjs");
|
|
42
42
|
return runListCommand(root, args.name || void 0);
|
|
43
43
|
}
|
|
44
44
|
if (args.subcommand === "link") {
|
|
45
45
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
46
|
-
const { runLink } = await import("./link-
|
|
46
|
+
const { runLink } = await import("./link-UEc7bnF4.mjs");
|
|
47
47
|
return runLink(root, args.name || void 0);
|
|
48
48
|
}
|
|
49
49
|
if (args.subcommand === "list") {
|
|
50
50
|
if (cloudflare) {
|
|
51
|
-
const { runListCommand } = await import("./list-
|
|
51
|
+
const { runListCommand } = await import("./list-CuWeOnzk.mjs");
|
|
52
52
|
return runListCommand(root);
|
|
53
53
|
}
|
|
54
54
|
return runProjectsCommand(root);
|
|
55
55
|
}
|
|
56
56
|
if (args.subcommand === "token") {
|
|
57
57
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
58
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
58
|
+
const { runProjectTokenCommand } = await import("./project-token-CvsRvv2I.mjs");
|
|
59
59
|
return runProjectTokenCommand(root, args);
|
|
60
60
|
}
|
|
61
61
|
if (args.subcommand === "team") {
|
|
62
62
|
if (args.action === "") {
|
|
63
|
-
const { printHelpPage } = await import("./help-
|
|
63
|
+
const { printHelpPage } = await import("./help-s9q7LTcu.mjs");
|
|
64
64
|
printHelpPage(["project", "team"]);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
68
68
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
69
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
69
|
+
const { runProjectTeamCommand } = await import("./project-team-B3_QcStG.mjs");
|
|
70
70
|
return runProjectTeamCommand(root, args);
|
|
71
71
|
}
|
|
72
72
|
if (args.subcommand === "zero-trust") {
|
|
73
73
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
74
74
|
if (args.action === "") {
|
|
75
|
-
const { printHelpPage } = await import("./help-
|
|
75
|
+
const { printHelpPage } = await import("./help-s9q7LTcu.mjs");
|
|
76
76
|
printHelpPage(["project", "zero-trust"]);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
const action = args.action;
|
|
80
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
80
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-D1ICiwN_.mjs");
|
|
81
81
|
return runProjectZeroTrustCommand(root, {
|
|
82
82
|
...args,
|
|
83
83
|
action
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (args.subcommand === "logs") {
|
|
87
|
-
const { runLogsCommand } = await import("./logs-
|
|
87
|
+
const { runLogsCommand } = await import("./logs-TihRcLTk.mjs");
|
|
88
88
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
89
89
|
}
|
|
90
90
|
if (args.subcommand === "requests") {
|
|
91
91
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
92
|
-
const { runRequestsCommand } = await import("./requests-
|
|
92
|
+
const { runRequestsCommand } = await import("./requests-3CL3BuZh.mjs");
|
|
93
93
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
94
94
|
}
|
|
95
95
|
if (args.subcommand === "rollback") {
|
|
96
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
96
|
+
const { runRollbackCommand } = await import("./rollback-Ce1d_0J9.mjs");
|
|
97
97
|
return runRollbackCommand(root, args.deployId || void 0);
|
|
98
98
|
}
|
|
99
99
|
if (args.subcommand === "cancel") {
|
|
100
100
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
101
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
101
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-CJKvk7AN.mjs");
|
|
102
102
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
103
103
|
}
|
|
104
104
|
if (args.subcommand === "delete") {
|
|
105
105
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
106
|
-
const { runDeleteCommand } = await import("./delete-
|
|
106
|
+
const { runDeleteCommand } = await import("./delete-BbsZFZIw.mjs");
|
|
107
107
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
108
108
|
}
|
|
109
109
|
if (args.subcommand === "purge-cache") {
|
|
110
110
|
if (cloudflare) throw new Error("project: Direct Cloudflare ISR cache purge is not available yet; redeploy or purge the configured KV namespace explicitly.");
|
|
111
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
111
|
+
const { runPurgeCacheCommand } = await import("./cache-D0Tt28cn.mjs");
|
|
112
112
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
113
113
|
}
|
|
114
114
|
}
|