void 0.27.0 → 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-l-FM7Ioq.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-Dn2vw-SG.mjs → auth-B6iOCjKI.mjs} +23 -56
- package/dist/{auth-link-vz9Z2kmG.mjs → auth-link-DWr6Afao.mjs} +10 -10
- package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
- package/dist/{auth-router-DvsCUVw4.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-D6we0VjO.mjs → build-cmd-Cr3FJxv0.mjs} +5 -5
- package/dist/{cache-CZRdzKx1.mjs → cache-D0Tt28cn.mjs} +5 -5
- package/dist/{cancel-deploy-CQ3NnMvf.mjs → cancel-deploy-CJKvk7AN.mjs} +4 -4
- package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
- package/dist/{cf-access-BcIBSKqG.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 +41 -15
- 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-DlDJuY0s.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-BfPBHHm-.mjs → connect-nukQSoEO.mjs} +8 -8
- package/dist/{create-project-BdXEFKal.mjs → create-project-D4APeBwX.mjs} +7 -7
- package/dist/{create-project-qFDC45zg.mjs → create-project-DL7YXpjj.mjs} +1 -1
- package/dist/{db-Xs80hcaA.mjs → db-27RztQLy.mjs} +173 -263
- package/dist/{delete-d2vuou3j.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-BsDUBAvt.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-_lGAHOhp.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-C74QepDE.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-DaDdBbSS.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-0bTe_lID.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-DaBGmaXC.mjs → init-ZWOJvc-Z.mjs} +179 -388
- package/dist/isr-config-DPjXM8J2.mjs +194 -0
- package/dist/{link-C6fjafep.mjs → link-UEc7bnF4.mjs} +8 -8
- package/dist/{list-BTFBlqKl.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-GKcNUmtI.mjs → login-CZ2Cqa-D.mjs} +11 -11
- package/dist/login-DhK7o1oJ.mjs +2 -0
- package/dist/{logs-BiMSULmc.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-DOBhIaIg.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
- package/dist/{operator-auth-BEZ_u0Cz.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
- package/dist/{operator-client-DbDv4vtE.mjs → operator-client-C-ROjk1I.mjs} +4 -4
- package/dist/{operator-cmd-BT4hgavL.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-DUeXY9Om.mjs → platform-args-C6Mb_I3a.mjs} +34 -58
- package/dist/platform-args-Cm7x-fot.mjs +2 -0
- package/dist/{platform-auth-config-CkSx3usH.mjs → platform-auth-config-CJmNkFT2.mjs} +10 -11
- package/dist/{platform-auth-protection-BJimB_p9.mjs → platform-auth-protection-D5wvsI-Y.mjs} +36 -26
- package/dist/{platform-auth-recovery-BU6izFAU.mjs → platform-auth-recovery-D_0I3n-1.mjs} +8 -9
- package/dist/{platform-cmd-BbmJiq5O.mjs → platform-cmd-Cuj4oUVo.mjs} +1 -1
- package/dist/{platform-cmd-BbY1dWiM.mjs → platform-cmd-DxxZO6e5.mjs} +15 -15
- package/dist/{platform-discovery-DIYz8V63.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
- package/dist/{platform-domain-CHVS6cV0.mjs → platform-domain-zLXnW1G_.mjs} +5 -5
- package/dist/{platform-lifecycle-DzCwqhFq.mjs → platform-lifecycle-DOW-wLfx.mjs} +1398 -2043
- package/dist/{platform-lifecycle-ByAlpkhV.mjs → platform-lifecycle-_gfnjUBr.mjs} +1 -1
- package/dist/{platform-management-CBOT4BSM.mjs → platform-management-CYrLvTGH.mjs} +1 -1
- package/dist/{platform-management-CuuVDhyt.mjs → platform-management-t7HKy4-U.mjs} +632 -124
- package/dist/{platform-plans-config-CN-heS4q.mjs → platform-plans-config-CNH6zbPX.mjs} +15 -11
- package/dist/{platform-recovery-CskSJgLh.mjs → platform-recovery-DeucI7A9.mjs} +6 -9
- package/dist/{platform-registry-Cjv2Qf0r.mjs → platform-registry-B9mWX9LO.mjs} +13 -18
- package/dist/{platform-setup-BBxRxmFC.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-DaoRrn-8.mjs → project-cmd-Dq75AXzy.mjs} +19 -19
- package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
- package/dist/{project-BAm2aB6Q.mjs → project-rqDnVsJN.mjs} +8 -4
- package/dist/{project-team-Q_lCA7Io.mjs → project-team-B3_QcStG.mjs} +6 -6
- package/dist/{project-token-BArgK9o1.mjs → project-token-CvsRvv2I.mjs} +5 -5
- package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
- package/dist/{project-zero-trust-KO9Hu2Pq.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-C7Oeoh5u.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-DVAtrLAl.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-BvtB7IjY.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/durable-state.md +24 -0
- package/docs/guide/platform/administration/access.md +4 -0
- package/docs/guide/platform/administration/connected-apps.md +55 -0
- package/docs/guide/platform/installation/credentials.md +3 -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/database.md +9 -3
- package/docs/reference/cli/platform-installation.md +1 -1
- package/docs/reference/cli/setup.md +2 -0
- package/package.json +13 -16
- package/skills/void/SKILL.md +1 -0
- package/dist/auth-LMJcNESe.mjs +0 -2
- package/dist/cf-build-output-H9a97vME.mjs +0 -2
- package/dist/cf-user-agent-lKblH3zU.mjs +0 -17
- package/dist/client-tso2OfcG.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-Bqe1PYBw.mjs +0 -10458
- package/dist/deploy-VsWsVQkw.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-DfQYVfGY.mjs +0 -2
- package/dist/login-mx_ydhmp.mjs +0 -2
- package/dist/migrate-BHp07yJE.mjs +0 -2
- package/dist/operator-cmd-CwBB-1yb.mjs +0 -2
- package/dist/pages/head-client.d.mts +0 -13
- package/dist/pages/head-client.mjs +0 -2
- package/dist/platform-args-D4E1PjVw.mjs +0 -2
- package/dist/prepare-DRUV-g3X.mjs +0 -2
- package/dist/project-DedqCp59.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,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { o as loadLocalEnv } from "./env-BxocywBB.mjs";
|
|
1
|
+
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-D0GY5ItR.mjs";
|
|
2
|
+
import { d as readConfig } from "./config-Bx_1SpnO.mjs";
|
|
3
|
+
import { r as getMiniflareDatabasePath } from "./runner-DcVDrzuR.mjs";
|
|
4
|
+
import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
|
|
6
5
|
import { r as resolveVoidAuthMigrationSchema } from "./drizzle-CF84FOVM.mjs";
|
|
7
|
-
import { n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-
|
|
6
|
+
import { a as pgMigrationRunner, i as mysqlMigrationRunner, n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-Cgs0k6lS.mjs";
|
|
8
7
|
//#region src/auth/node.ts
|
|
9
|
-
async function runLocalVoidAuthMigrations(root, dialect, persistRoot
|
|
8
|
+
async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, configPath = findVoidAuthConfig(root)) {
|
|
10
9
|
const authConfig = await loadVoidAuthConfig(configPath);
|
|
11
10
|
const runtime = {
|
|
12
11
|
dialect,
|
|
@@ -41,15 +40,7 @@ async function runLocalVoidAuthMigrations(root, dialect, persistRoot = join(root
|
|
|
41
40
|
const { createConnection } = await import("mysql2/promise");
|
|
42
41
|
const connection = await createConnection(connectionString);
|
|
43
42
|
try {
|
|
44
|
-
await applyMySqlAuthMigrations(
|
|
45
|
-
async all(sql, params) {
|
|
46
|
-
const [rows] = await connection.query(sql, params);
|
|
47
|
-
return rows;
|
|
48
|
-
},
|
|
49
|
-
async run(sql, params) {
|
|
50
|
-
await connection.query(sql, params);
|
|
51
|
-
}
|
|
52
|
-
}, migrationSchema);
|
|
43
|
+
await applyMySqlAuthMigrations(mysqlMigrationRunner(connection), migrationSchema);
|
|
53
44
|
} finally {
|
|
54
45
|
await connection.end();
|
|
55
46
|
}
|
|
@@ -59,14 +50,7 @@ async function runLocalVoidAuthMigrations(root, dialect, persistRoot = join(root
|
|
|
59
50
|
const client = new Client({ connectionString });
|
|
60
51
|
await client.connect();
|
|
61
52
|
try {
|
|
62
|
-
await applyPgAuthMigrations(
|
|
63
|
-
async all(sql, params) {
|
|
64
|
-
return (await client.query(sql, params)).rows;
|
|
65
|
-
},
|
|
66
|
-
async run(sql, params) {
|
|
67
|
-
await client.query(sql, params);
|
|
68
|
-
}
|
|
69
|
-
}, migrationSchema);
|
|
53
|
+
await applyPgAuthMigrations(pgMigrationRunner(client), migrationSchema);
|
|
70
54
|
} finally {
|
|
71
55
|
await client.end();
|
|
72
56
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as OPERATOR_MAX_TIMEOUT_MS } from "./operator-client-
|
|
1
|
+
import { t as OPERATOR_MAX_TIMEOUT_MS } from "./operator-client-C-ROjk1I.mjs";
|
|
2
|
+
import { parsePlatformLoginId } from "@void/platform";
|
|
2
3
|
//#region src/cli/operator-args.ts
|
|
3
4
|
const operatorCommands = [
|
|
4
5
|
{
|
|
@@ -7,7 +8,7 @@ const operatorCommands = [
|
|
|
7
8
|
description: "Sign in as a platform administrator",
|
|
8
9
|
path: "/session",
|
|
9
10
|
values: { provider: "OAuth provider" },
|
|
10
|
-
booleans:
|
|
11
|
+
booleans: { "token-stdin": "Read a full API session from stdin for explicit operator session exchange" }
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
group: "auth",
|
|
@@ -26,7 +27,7 @@ const operatorCommands = [
|
|
|
26
27
|
action: "token",
|
|
27
28
|
description: "Print an operator token; exchange an API session with --token-stdin",
|
|
28
29
|
path: "/session",
|
|
29
|
-
booleans:
|
|
30
|
+
booleans: { "token-stdin": "Read a full API session from stdin for explicit operator session exchange" }
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
33
|
group: "user",
|
|
@@ -121,7 +122,7 @@ const operatorCommands = [
|
|
|
121
122
|
action: "status",
|
|
122
123
|
description: "Inspect saved platform Zero Trust configuration and project state counts",
|
|
123
124
|
path: "/zero-trust",
|
|
124
|
-
booleans:
|
|
125
|
+
booleans: { check: "Also check the saved settings against Cloudflare Access (several API calls)" }
|
|
125
126
|
},
|
|
126
127
|
{
|
|
127
128
|
group: "zero-trust",
|
|
@@ -133,11 +134,11 @@ const operatorCommands = [
|
|
|
133
134
|
policies: "Comma-separated reusable Access policy IDs",
|
|
134
135
|
"existing-projects": "Required when enabling: protected or public for existing projects"
|
|
135
136
|
},
|
|
136
|
-
booleans:
|
|
137
|
-
"token-stdin",
|
|
138
|
-
"protect-new-projects",
|
|
139
|
-
"public-apps"
|
|
140
|
-
|
|
137
|
+
booleans: {
|
|
138
|
+
"token-stdin": "Read the Access management API token from stdin",
|
|
139
|
+
"protect-new-projects": "Protect newly created projects by default",
|
|
140
|
+
"public-apps": "Manage public app rules without identity policies"
|
|
141
|
+
},
|
|
141
142
|
method: "POST"
|
|
142
143
|
},
|
|
143
144
|
{
|
|
@@ -230,7 +231,7 @@ const operatorCommands = [
|
|
|
230
231
|
since: "Duration or ISO timestamp",
|
|
231
232
|
cursor: "Opaque continuation cursor"
|
|
232
233
|
},
|
|
233
|
-
booleans:
|
|
234
|
+
booleans: { follow: "Poll new logs until interrupted or the build ends" }
|
|
234
235
|
},
|
|
235
236
|
{
|
|
236
237
|
group: "build",
|
|
@@ -246,7 +247,7 @@ const operatorCommands = [
|
|
|
246
247
|
path: "/builds/:id/logs",
|
|
247
248
|
positional: ["id"],
|
|
248
249
|
values: { since: "Last received sequence number" },
|
|
249
|
-
booleans:
|
|
250
|
+
booleans: { follow: "Poll new logs until interrupted or the build ends" }
|
|
250
251
|
},
|
|
251
252
|
{
|
|
252
253
|
group: "signup",
|
|
@@ -372,7 +373,7 @@ const operatorCommands = [
|
|
|
372
373
|
description: "Rotate project proxy tokens on tenant Workers",
|
|
373
374
|
path: "/system/rotate-proxy-tokens",
|
|
374
375
|
values: { project: "Project ID" },
|
|
375
|
-
booleans:
|
|
376
|
+
booleans: { all: "Rotate every project" },
|
|
376
377
|
method: "POST"
|
|
377
378
|
},
|
|
378
379
|
{
|
|
@@ -437,7 +438,7 @@ const operatorCommands = [
|
|
|
437
438
|
path: "/email/attempts/:id/resolve",
|
|
438
439
|
positional: ["id"],
|
|
439
440
|
values: { reason: "Audit reason without recipient or message content" },
|
|
440
|
-
booleans:
|
|
441
|
+
booleans: { ended: "Attest that the original provider execution has ended" },
|
|
441
442
|
method: "POST"
|
|
442
443
|
},
|
|
443
444
|
{
|
|
@@ -450,7 +451,7 @@ const operatorCommands = [
|
|
|
450
451
|
outcome: "Provider outcome: applied or not-applied",
|
|
451
452
|
reason: "Audit reason for the verified provider outcome"
|
|
452
453
|
},
|
|
453
|
-
booleans:
|
|
454
|
+
booleans: { ended: "Attest that the original provider execution has ended" },
|
|
454
455
|
method: "POST"
|
|
455
456
|
},
|
|
456
457
|
{
|
|
@@ -470,7 +471,7 @@ const operatorCommands = [
|
|
|
470
471
|
outcome: "Provider outcome: applied or not-applied",
|
|
471
472
|
reason: "Audit reason for the verified provider outcome"
|
|
472
473
|
},
|
|
473
|
-
booleans:
|
|
474
|
+
booleans: { ended: "Attest that the original provider execution has ended" },
|
|
474
475
|
method: "POST"
|
|
475
476
|
},
|
|
476
477
|
{
|
|
@@ -487,7 +488,7 @@ const operatorCommands = [
|
|
|
487
488
|
path: "/email/domains",
|
|
488
489
|
positional: ["domain"],
|
|
489
490
|
values: { project: "Project id or slug" },
|
|
490
|
-
booleans:
|
|
491
|
+
booleans: { "token-stdin": "Read a scoped Cloudflare API token from stdin" },
|
|
491
492
|
method: "POST"
|
|
492
493
|
},
|
|
493
494
|
{
|
|
@@ -519,7 +520,7 @@ const operatorCommands = [
|
|
|
519
520
|
description: "Remove an email domain and its Cloudflare setup",
|
|
520
521
|
path: "/email/domains/:domain/remove",
|
|
521
522
|
positional: ["domain"],
|
|
522
|
-
booleans:
|
|
523
|
+
booleans: { "token-stdin": "Read a replacement Cloudflare token for blocked project cleanup from stdin" },
|
|
523
524
|
method: "POST"
|
|
524
525
|
},
|
|
525
526
|
{
|
|
@@ -573,11 +574,8 @@ function parseOperatorArgs(args) {
|
|
|
573
574
|
"json",
|
|
574
575
|
"plan",
|
|
575
576
|
"yes",
|
|
576
|
-
"follow",
|
|
577
|
-
"token-stdin",
|
|
578
577
|
"force",
|
|
579
|
-
|
|
580
|
-
...operatorCommands.flatMap((command) => command.booleans ?? [])
|
|
578
|
+
...operatorCommands.flatMap((command) => Object.keys(command.booleans ?? {}))
|
|
581
579
|
]);
|
|
582
580
|
for (let index = 0; index < args.length; index++) {
|
|
583
581
|
const arg = args[index];
|
|
@@ -607,8 +605,7 @@ function parseOperatorArgs(args) {
|
|
|
607
605
|
yes: flags.has("yes"),
|
|
608
606
|
follow: flags.has("follow"),
|
|
609
607
|
tokenStdin: flags.has("token-stdin"),
|
|
610
|
-
provider: values.provider
|
|
611
|
-
...values.provider ? { providerExplicit: true } : {},
|
|
608
|
+
provider: values.provider,
|
|
612
609
|
method: "GET",
|
|
613
610
|
path: "",
|
|
614
611
|
query: {},
|
|
@@ -633,7 +630,7 @@ function parseOperatorArgs(args) {
|
|
|
633
630
|
for (const name of flags) if (![
|
|
634
631
|
"json",
|
|
635
632
|
...command.method ? ["yes", "plan"] : [],
|
|
636
|
-
...command.booleans ??
|
|
633
|
+
...Object.keys(command.booleans ?? {})
|
|
637
634
|
].includes(name)) throw new Error(`platform: Unknown flag '--${name}' for ${group} ${action}.`);
|
|
638
635
|
if (parsed.plan && parsed.yes) throw new Error("platform: --plan and --yes cannot be combined.");
|
|
639
636
|
parsed.path = command.path;
|
|
@@ -641,7 +638,11 @@ function parseOperatorArgs(args) {
|
|
|
641
638
|
if (identitySignupEntry) {
|
|
642
639
|
const connectionId = parameters[1];
|
|
643
640
|
const subject = parameters[2];
|
|
644
|
-
|
|
641
|
+
try {
|
|
642
|
+
parsePlatformLoginId(connectionId);
|
|
643
|
+
} catch {
|
|
644
|
+
throw new Error("platform: Invalid login connection ID.");
|
|
645
|
+
}
|
|
645
646
|
if (!subject || subject.length > 255) throw new Error("platform: Identity subject must be 1–255 characters.");
|
|
646
647
|
parsed.body = {
|
|
647
648
|
type: "identity",
|
|
@@ -678,7 +679,7 @@ function parseOperatorArgs(args) {
|
|
|
678
679
|
"email",
|
|
679
680
|
"identity"
|
|
680
681
|
].includes(String(parsed.body.type))) throw new Error("platform: Signup grant type must be github, email, or identity.");
|
|
681
|
-
for (const name of command.booleans ??
|
|
682
|
+
for (const name of Object.keys(command.booleans ?? {})) if (name !== "token-stdin" && flags.has(name)) parsed.body[name] = true;
|
|
682
683
|
if (group === "zero-trust" && action === "configure") {
|
|
683
684
|
if (!parsed.tokenStdin) throw new Error("platform: zero-trust configure requires --token-stdin.");
|
|
684
685
|
const identityProviderIds = values["identity-providers"]?.split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, r as findPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-
|
|
2
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
1
|
+
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, r as findPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
|
|
3
3
|
/** Operator authority never comes from repository-controlled metadata. */
|
|
4
4
|
function resolveOperatorOrigin(connection = "") {
|
|
5
5
|
if (connection) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as normalizePlatformApiUrl } from "./platform-registry-
|
|
2
|
-
import { t as cfAccessHeaders } from "./cf-access-
|
|
3
|
-
import { t as
|
|
1
|
+
import { c as normalizePlatformApiUrl } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
|
+
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
3
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
|
|
4
4
|
const OPERATOR_MAX_TIMEOUT_MS = 36e5;
|
|
5
5
|
var OperatorClientError = class extends Error {
|
|
6
6
|
code;
|
|
@@ -36,7 +36,7 @@ var OperatorClient = class {
|
|
|
36
36
|
const timeoutMs = options.timeoutMs ?? (options.method === "POST" ? 3e5 : 3e4);
|
|
37
37
|
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1e3 || timeoutMs > 36e5) throw new OperatorClientError(`Operator request timeout must be an integer from 1 to ${OPERATOR_MAX_TIMEOUT_MS / 1e3} seconds.`, "invalid_timeout");
|
|
38
38
|
const url = new URL(`${this.origin}/operator/v1${path}`);
|
|
39
|
-
|
|
39
|
+
ensurePlatformAccessToken(this.origin);
|
|
40
40
|
for (const [name, value] of Object.entries(options.query ?? {})) url.searchParams.set(name, value);
|
|
41
41
|
const timeoutController = new AbortController();
|
|
42
42
|
const timer = setTimeout(() => timeoutController.abort(), timeoutMs);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
3
|
-
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-
|
|
1
|
+
import { h as sanitizeTerminalText, m as printSuccess } from "./output-FNHKw5Ac.mjs";
|
|
2
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
|
|
3
|
+
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-Cr2zCc-J.mjs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { setTimeout } from "node:timers/promises";
|
|
6
6
|
import { createInterface } from "node:readline/promises";
|
|
@@ -163,10 +163,10 @@ async function runAuth(origin, args) {
|
|
|
163
163
|
if (args.action === "login" || args.action === "token" && args.tokenStdin) {
|
|
164
164
|
if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
|
|
165
165
|
const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
|
|
166
|
-
const { discoverPlatform } = await import("./platform-cmd-
|
|
167
|
-
const { selectPlatformLoginMethod } = await import("./login-
|
|
168
|
-
const { runPlatformLogin } = await import("./auth-
|
|
169
|
-
return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.
|
|
166
|
+
const { discoverPlatform } = await import("./platform-cmd-Cuj4oUVo.mjs");
|
|
167
|
+
const { selectPlatformLoginMethod } = await import("./login-DhK7o1oJ.mjs");
|
|
168
|
+
const { runPlatformLogin } = await import("./auth-wn6F8dB8.mjs");
|
|
169
|
+
return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.provider)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
|
|
170
170
|
})();
|
|
171
171
|
const session = await exchangeOperatorSession(origin, apiToken);
|
|
172
172
|
const { token, ...identity } = session;
|
|
@@ -344,7 +344,7 @@ async function migrateDeploymentAssets(client, origin, args) {
|
|
|
344
344
|
}
|
|
345
345
|
async function runOperatorCommand(args) {
|
|
346
346
|
if (!args.action) {
|
|
347
|
-
const { printHelpPage } = await import("./help-
|
|
347
|
+
const { printHelpPage } = await import("./help-s9q7LTcu.mjs");
|
|
348
348
|
printHelpPage(["platform", args.group]);
|
|
349
349
|
return;
|
|
350
350
|
}
|
|
@@ -2,8 +2,18 @@ import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
|
2
2
|
import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
|
|
3
3
|
import { B as note$1, H as outro, L as log, P as isCI, nt as settings, q as spinner } from "./dist-D3m88sjf.mjs";
|
|
4
4
|
import { stripVTControlCharacters } from "node:util";
|
|
5
|
+
import terminalLink from "terminal-link";
|
|
5
6
|
//#region src/cli/output.ts
|
|
6
7
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
8
|
+
/** Keep the destination visible when the terminal cannot render a named hyperlink. */
|
|
9
|
+
function formatLink(text, url) {
|
|
10
|
+
return terminalLink(text, sanitizeTerminalText(url), { fallback: (label, href) => label === href ? label : `${label}: ${href}` });
|
|
11
|
+
}
|
|
12
|
+
/** Link a displayed URL without duplicating it in unsupported terminals or redirected output. */
|
|
13
|
+
function formatUrl(url) {
|
|
14
|
+
const text = sanitizeTerminalText(url);
|
|
15
|
+
return formatLink(text, text);
|
|
16
|
+
}
|
|
7
17
|
/** Complete an action with the same spacing, checkmark, and color on every target. */
|
|
8
18
|
function printSuccess(message) {
|
|
9
19
|
outro(`\n${import_picocolors.default.green(`✓ ${stripVTControlCharacters(message)}`)}`, { withGuide: false });
|
|
@@ -68,17 +78,26 @@ const MIN_NOTE_COLUMNS = 6;
|
|
|
68
78
|
*/
|
|
69
79
|
function note(...args) {
|
|
70
80
|
const [message, title, opts] = args;
|
|
81
|
+
const plainTitle = title && sanitizeTerminalText(stripVTControlCharacters(title));
|
|
82
|
+
const urlTitle = plainTitle && /^https?:\/\/\S+$/.test(plainTitle) ? plainTitle : void 0;
|
|
83
|
+
const boxedTitle = urlTitle ? ` ${urlTitle} ` : title;
|
|
71
84
|
const output = opts?.output ?? process.stdout;
|
|
72
85
|
const columns = output.columns;
|
|
73
|
-
|
|
86
|
+
const needsWidthFallback = typeof columns === "number" && columns < MIN_NOTE_COLUMNS;
|
|
87
|
+
if (!urlTitle && !needsWidthFallback) {
|
|
74
88
|
note$1(...args);
|
|
75
89
|
return;
|
|
76
90
|
}
|
|
91
|
+
let header = true;
|
|
77
92
|
const sized = {
|
|
78
|
-
columns: columns > 0 ? MIN_NOTE_COLUMNS : 80,
|
|
79
|
-
write
|
|
93
|
+
columns: needsWidthFallback ? columns > 0 ? MIN_NOTE_COLUMNS : 80 : columns,
|
|
94
|
+
write(chunk) {
|
|
95
|
+
if (header && urlTitle) chunk = chunk.replace(` ${urlTitle} `, ` ${formatUrl(urlTitle)} `);
|
|
96
|
+
header = false;
|
|
97
|
+
return output.write(chunk);
|
|
98
|
+
}
|
|
80
99
|
};
|
|
81
|
-
note$1(message,
|
|
100
|
+
note$1(message, boxedTitle, {
|
|
82
101
|
...opts,
|
|
83
102
|
output: sized
|
|
84
103
|
});
|
|
@@ -114,6 +133,18 @@ function ensureUtc(s) {
|
|
|
114
133
|
if (s.lastIndexOf("-") > 9) return s;
|
|
115
134
|
return s + "Z";
|
|
116
135
|
}
|
|
136
|
+
function formatRelativeTime(iso) {
|
|
137
|
+
const diffMs = Date.now() - new Date(ensureUtc(iso)).getTime();
|
|
138
|
+
if (diffMs < 6e4) return "just now";
|
|
139
|
+
const minutes = Math.floor(diffMs / 6e4);
|
|
140
|
+
if (minutes < 60) return `${minutes}m ago`;
|
|
141
|
+
const hours = Math.floor(minutes / 60);
|
|
142
|
+
if (hours < 24) return `${hours}h ago`;
|
|
143
|
+
return `${Math.floor(hours / 24)}d ago`;
|
|
144
|
+
}
|
|
145
|
+
function getErrorMessage(error) {
|
|
146
|
+
return error instanceof Error ? error.message : String(error);
|
|
147
|
+
}
|
|
117
148
|
/**
|
|
118
149
|
* Stack frames of an error a Worker reported, one line per frame. The log or
|
|
119
150
|
* exception line already shows `Name: message`, so a leading copy of that
|
|
@@ -128,4 +159,4 @@ function errorStackFrames(error) {
|
|
|
128
159
|
return frames.trimEnd() ? frames.trimEnd().split("\n") : [];
|
|
129
160
|
}
|
|
130
161
|
//#endregion
|
|
131
|
-
export {
|
|
162
|
+
export { tablePrefix as _, errorStackFrames as a, formatRelativeTime as c, helpLine as d, import_picocolors as f, sectionTitle as g, sanitizeTerminalText as h, dim as i, formatUrl as l, printSuccess as m, cliCommandName as n, formatCount as o, note as p, createSpinner as r, formatLink as s, categoryTitle as t, getErrorMessage as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./dist-
|
|
1
|
+
import { a as join, n as dirname } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
//#region src/shared/package-json.ts
|
|
4
4
|
const DEFAULT_DEPENDENCY_FIELDS = ["dependencies", "devDependencies"];
|
package/dist/pages/client.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as interpolateRouteParams } from "../route-url-BgPja1GS.mjs";
|
|
2
|
-
import { t as PageObject } from "../protocol-
|
|
2
|
+
import { t as PageObject } from "../protocol-4H7V_3Os.mjs";
|
|
3
3
|
import { n as CacheForInput, r as CacheForResult } from "../prefetch-Ce6la4EI.mjs";
|
|
4
4
|
import { UsageLimitData } from "@void/edge";
|
|
5
5
|
import { ActionUrl, ResolveActionBody, ResolveActionParams } from "void/routes";
|
package/dist/pages/client.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { t as interpolateRouteParams } from "../route-url-BjGv_KKY.mjs";
|
|
2
|
-
import { n as initClientHead, t as applyClientHead } from "../head-client-DzmJGN4C.mjs";
|
|
3
2
|
import { n as parseCacheFor, t as PrefetchCache } from "../prefetch-Bsc_Pb6c.mjs";
|
|
4
3
|
import { readUsageLimit } from "@void/edge";
|
|
5
4
|
//#region src/pages/action-result.ts
|
|
@@ -60,6 +59,95 @@ async function createActionErrorFromResponse(response, url) {
|
|
|
60
59
|
});
|
|
61
60
|
}
|
|
62
61
|
//#endregion
|
|
62
|
+
//#region src/pages/head-client.ts
|
|
63
|
+
const ATTR = "data-void-head";
|
|
64
|
+
function elementDescriptorSignature(descriptor) {
|
|
65
|
+
const attrs = Object.entries(descriptor.attrs).sort(([a], [b]) => a.localeCompare(b));
|
|
66
|
+
return `${encodeURIComponent(descriptor.tag)}:${attrs.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&")}`;
|
|
67
|
+
}
|
|
68
|
+
function elementSignature(el) {
|
|
69
|
+
const attrs = {};
|
|
70
|
+
for (const attr of Array.from(el.attributes)) if (attr.name !== ATTR) attrs[attr.name] = attr.value;
|
|
71
|
+
return elementDescriptorSignature({
|
|
72
|
+
tag: el.tagName.toLowerCase(),
|
|
73
|
+
attrs
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function createHeadElement(descriptor) {
|
|
77
|
+
const el = document.createElement(descriptor.tag);
|
|
78
|
+
for (const [key, value] of Object.entries(descriptor.attrs)) el.setAttribute(key, value);
|
|
79
|
+
el.setAttribute(ATTR, "");
|
|
80
|
+
return el;
|
|
81
|
+
}
|
|
82
|
+
function collectDesiredHeadElements(head) {
|
|
83
|
+
const desired = [];
|
|
84
|
+
if (head.meta) for (const entry of head.meta) {
|
|
85
|
+
const attrs = {};
|
|
86
|
+
if (entry.charset) attrs.charset = entry.charset;
|
|
87
|
+
if (entry.name) attrs.name = entry.name;
|
|
88
|
+
if (entry.property) attrs.property = entry.property;
|
|
89
|
+
if (entry.content !== void 0) attrs.content = entry.content;
|
|
90
|
+
desired.push({
|
|
91
|
+
tag: "meta",
|
|
92
|
+
attrs
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
if (head.link) for (const entry of head.link) {
|
|
96
|
+
const attrs = {};
|
|
97
|
+
for (const [key, value] of Object.entries(entry)) if (value != null) attrs[key] = value;
|
|
98
|
+
desired.push({
|
|
99
|
+
tag: "link",
|
|
100
|
+
attrs
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return desired;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Mark SSR-rendered head tags so they are cleaned up on the first SPA navigation.
|
|
107
|
+
* Call once after hydration with the initial page's head descriptor.
|
|
108
|
+
*/
|
|
109
|
+
function initClientHead(head) {
|
|
110
|
+
if (!head) return;
|
|
111
|
+
if (head.meta) for (const entry of head.meta) {
|
|
112
|
+
const selector = entry.charset ? "meta[charset]" : entry.property ? `meta[property="${entry.property}"]` : entry.name ? `meta[name="${entry.name}"]` : null;
|
|
113
|
+
if (!selector) continue;
|
|
114
|
+
const el = document.head.querySelector(selector);
|
|
115
|
+
if (el) el.setAttribute(ATTR, "");
|
|
116
|
+
}
|
|
117
|
+
if (head.link) for (const entry of head.link) {
|
|
118
|
+
const el = document.head.querySelector(`link[rel="${entry.rel}"][href="${entry.href}"]`);
|
|
119
|
+
if (el) el.setAttribute(ATTR, "");
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Apply head changes on SPA navigation.
|
|
124
|
+
* Preserves existing managed tags when their final attributes are unchanged.
|
|
125
|
+
*/
|
|
126
|
+
function applyClientHead(head) {
|
|
127
|
+
const existing = /* @__PURE__ */ new Map();
|
|
128
|
+
for (const el of document.head.querySelectorAll(`[${ATTR}]`)) {
|
|
129
|
+
const signature = elementSignature(el);
|
|
130
|
+
const elements = existing.get(signature);
|
|
131
|
+
if (elements) elements.push(el);
|
|
132
|
+
else existing.set(signature, [el]);
|
|
133
|
+
}
|
|
134
|
+
const desiredElements = [];
|
|
135
|
+
for (const descriptor of head ? collectDesiredHeadElements(head) : []) {
|
|
136
|
+
const signature = elementDescriptorSignature(descriptor);
|
|
137
|
+
const elements = existing.get(signature);
|
|
138
|
+
const preserved = elements?.shift();
|
|
139
|
+
if (elements && elements.length === 0) existing.delete(signature);
|
|
140
|
+
desiredElements.push(preserved ?? createHeadElement(descriptor));
|
|
141
|
+
}
|
|
142
|
+
for (const elements of existing.values()) for (const el of elements) el.remove();
|
|
143
|
+
let cursor = document.head.querySelector(`[${ATTR}]`);
|
|
144
|
+
for (const el of desiredElements) {
|
|
145
|
+
if (el !== cursor) document.head.insertBefore(el, cursor);
|
|
146
|
+
cursor = el.nextSibling;
|
|
147
|
+
}
|
|
148
|
+
if (head?.title !== void 0) document.title = head.title;
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
63
151
|
//#region src/pages/scroll-restoration.ts
|
|
64
152
|
const STORAGE_PREFIX = "void:scroll:";
|
|
65
153
|
function readKey(state) {
|
|
@@ -573,7 +661,6 @@ async function createPageNavigationEngine(config) {
|
|
|
573
661
|
buffer += decoder.decode(value, { stream: true });
|
|
574
662
|
processLines();
|
|
575
663
|
}
|
|
576
|
-
if (buffer.trim()) processLines();
|
|
577
664
|
} catch (e) {
|
|
578
665
|
if (!(e instanceof Error) || e.name !== "AbortError") deferredRegistry.rejectPending("Stream closed before resolution");
|
|
579
666
|
}
|
|
@@ -1047,7 +1134,7 @@ async function createVoidRouter(config) {
|
|
|
1047
1134
|
}
|
|
1048
1135
|
}
|
|
1049
1136
|
}
|
|
1050
|
-
const
|
|
1137
|
+
const router = {
|
|
1051
1138
|
_hoverDelay: engine._hoverDelay,
|
|
1052
1139
|
get url() {
|
|
1053
1140
|
return toUrl(routeUrl);
|
|
@@ -1065,7 +1152,7 @@ async function createVoidRouter(config) {
|
|
|
1065
1152
|
return applyNavigationResource(engine.prepareVisit(normalizeUrl(url), options));
|
|
1066
1153
|
},
|
|
1067
1154
|
refresh(options = {}) {
|
|
1068
|
-
return
|
|
1155
|
+
return router.visit(window.location.pathname + window.location.search, {
|
|
1069
1156
|
preserveState: true,
|
|
1070
1157
|
preserveScroll: true,
|
|
1071
1158
|
...options
|
|
@@ -1081,7 +1168,6 @@ async function createVoidRouter(config) {
|
|
|
1081
1168
|
engine.flushAll();
|
|
1082
1169
|
}
|
|
1083
1170
|
};
|
|
1084
|
-
const router = createRouterFacade(rawRouter, () => routeUrl, () => routeParams);
|
|
1085
1171
|
engine.setPopStateHandler((url, options) => {
|
|
1086
1172
|
router.visit(url, options);
|
|
1087
1173
|
});
|
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-C8K_iGe6.mjs";
|
|
2
|
-
import "../config-
|
|
2
|
+
import "../config-7qoq2p9v.mjs";
|
|
3
3
|
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-BAp5AEBU.mjs";
|
|
4
4
|
import { t as serializePageData } from "../serialize-CfSwWfF2.mjs";
|
|
5
5
|
//#region src/project-paths.d.ts
|
|
@@ -17,7 +17,6 @@ type ProjectPaths = {
|
|
|
17
17
|
migrationsDir: string;
|
|
18
18
|
schemaFile: string;
|
|
19
19
|
schemaDir: string;
|
|
20
|
-
srcDir: string;
|
|
21
20
|
ssrDir: string;
|
|
22
21
|
sourceRelative: (path: string) => string;
|
|
23
22
|
authConfigCandidates: ReadonlyArray<string>;
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as join } from "../dist-
|
|
2
|
-
import { r as resolvePagesDir } from "../project-paths-
|
|
3
|
-
import {
|
|
4
|
-
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, o as toLayoutId, r as resolveLayoutChain, t as scanPages } from "../scan-
|
|
5
|
-
import {
|
|
1
|
+
import { a as join } from "../dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { r as resolvePagesDir } from "../project-paths-DMvEeSau.mjs";
|
|
3
|
+
import { d as readConfig } from "../config-Bx_1SpnO.mjs";
|
|
4
|
+
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, o as toLayoutId, r as resolveLayoutChain, t as scanPages } from "../scan-C0BMdmEd.mjs";
|
|
5
|
+
import { r as parseRedirectsFile } from "../headers-Di1FsD3e.mjs";
|
|
6
6
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-D2VF4ApL.mjs";
|
|
7
|
-
import { t as serializePageData } from "../serialize-
|
|
7
|
+
import { t as serializePageData } from "../serialize-BtQyaYoC.mjs";
|
|
8
8
|
//#region src/pages/manifest.ts
|
|
9
9
|
/**
|
|
10
10
|
* Generates the component import map and layout tree as code strings.
|
|
@@ -1,86 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-C3uDzz6J.mjs";
|
|
4
|
-
import { t as MagicString } from "../dist-Cegxq8gs.mjs";
|
|
1
|
+
import { c as resolve, n as dirname } from "../dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { c as findIslandImports, l as findStaticCssImports, n as resolveEffectiveLayoutChain, s as editIslandSource, t as scanPages } from "../scan-C0BMdmEd.mjs";
|
|
5
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
6
|
-
import { normalizePath
|
|
7
|
-
//#region src/pages/island-imports.ts
|
|
8
|
-
/** The whole JS/TS module, or each `<script>` block of a Vue/Svelte SFC with its offset in the file. */
|
|
9
|
-
function scriptBlocks(code, filename) {
|
|
10
|
-
if (!/\.(?:vue|svelte)$/.test(filename)) return [{
|
|
11
|
-
source: code,
|
|
12
|
-
offset: 0,
|
|
13
|
-
filename
|
|
14
|
-
}];
|
|
15
|
-
const scriptFilename = filename.replace(/\.(?:vue|svelte)$/, ".ts");
|
|
16
|
-
return [...code.matchAll(/<script\b[^>]*>([\s\S]*?)<\/script\s*>/gi)].map((match) => {
|
|
17
|
-
const source = match[1];
|
|
18
|
-
return {
|
|
19
|
-
source,
|
|
20
|
-
offset: match.index + match[0].indexOf(source),
|
|
21
|
-
filename: scriptFilename
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/** Collect stylesheet imports from authored modules without treating dynamic imports or text as dependencies. */
|
|
26
|
-
function findStaticCssImports(code, filename) {
|
|
27
|
-
if (!code.includes("import")) return [];
|
|
28
|
-
const imports = [];
|
|
29
|
-
for (const script of scriptBlocks(code, filename)) {
|
|
30
|
-
if (!script.source.includes("import")) continue;
|
|
31
|
-
const program = parseSync(script.filename, script.source).program;
|
|
32
|
-
for (const node of program.body ?? []) {
|
|
33
|
-
const source = node.source;
|
|
34
|
-
if (node.type !== "ImportDeclaration" || !isLiteral(source) || typeof source.value !== "string" || !/\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)$/.test(source.value) || node.start === void 0 || node.end === void 0) continue;
|
|
35
|
-
imports.push({
|
|
36
|
-
statement: script.source.slice(node.start, node.end),
|
|
37
|
-
specifier: source.value
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return imports;
|
|
42
|
-
}
|
|
43
|
-
function editIslandSource(code, edits, options) {
|
|
44
|
-
const ms = new MagicString(code);
|
|
45
|
-
for (const edit of edits) ms.overwrite(edit.start, edit.end, edit.text);
|
|
46
|
-
for (const insertion of options?.insert ?? []) ms.appendLeft(insertion.offset, insertion.text);
|
|
47
|
-
if (options?.prepend) ms.prepend(options.prepend);
|
|
48
|
-
if (options?.append) ms.append(options.append);
|
|
49
|
-
return {
|
|
50
|
-
code: ms.toString(),
|
|
51
|
-
map: ms.generateMap({ hires: true })
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
/** Read island import attributes from JS/TS, or script blocks inside an SFC. */
|
|
55
|
-
function findIslandImports(code, filename) {
|
|
56
|
-
if (!code.includes("import") || !code.includes("island")) return [];
|
|
57
|
-
const imports = [];
|
|
58
|
-
for (const script of scriptBlocks(code, filename)) {
|
|
59
|
-
if (!script.source.includes("island")) continue;
|
|
60
|
-
const program = parseSync(script.filename, script.source).program;
|
|
61
|
-
for (const node of program.body ?? []) {
|
|
62
|
-
if (node.type !== "ImportDeclaration") continue;
|
|
63
|
-
const specifiers = node.specifiers;
|
|
64
|
-
const attributes = node.attributes;
|
|
65
|
-
const first = specifiers?.[0];
|
|
66
|
-
const attribute = attributes?.[0];
|
|
67
|
-
const key = attribute?.key;
|
|
68
|
-
const value = attribute?.value;
|
|
69
|
-
const source = node.source;
|
|
70
|
-
if (specifiers?.length !== 1 || first?.type !== "ImportDefaultSpecifier" || !isIdentifier(first.local) || attributes?.length !== 1 || !isIdentifier(key) || key.name !== "island" || !isLiteral(value) || typeof value.value !== "string" || !isLiteral(source) || typeof source.value !== "string" || source.start === void 0 || source.end === void 0 || node.start === void 0 || node.end === void 0) continue;
|
|
71
|
-
imports.push({
|
|
72
|
-
start: script.offset + node.start,
|
|
73
|
-
end: script.offset + node.end,
|
|
74
|
-
importName: first.local.name,
|
|
75
|
-
specifierRaw: script.source.slice(source.start, source.end),
|
|
76
|
-
specifier: source.value,
|
|
77
|
-
hydrate: value.value
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return imports;
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
4
|
+
import { normalizePath } from "vite";
|
|
84
5
|
//#region src/pages/islands-plugin.ts
|
|
85
6
|
const ISLANDS_RENDERER_ID = "virtual:void-islands-renderer";
|
|
86
7
|
const ISLANDS_CLIENT_ENTRY_ID = "virtual:void-islands-client";
|
|
@@ -138,7 +59,8 @@ function rewriteCssImportForVirtualModule(matchedLine, specifier, sourceFilePath
|
|
|
138
59
|
}
|
|
139
60
|
/** Extract CSS import statements from a file and return them as @import rules. */
|
|
140
61
|
function extractCssImports(filePath) {
|
|
141
|
-
|
|
62
|
+
const code = readFileSync(filePath, "utf-8");
|
|
63
|
+
return findStaticCssImports(code, filePath).map(({ specifier }) => `@import ${JSON.stringify(specifier)};`).join("\n");
|
|
142
64
|
}
|
|
143
65
|
/** Compute which island pages need client-side JavaScript. */
|
|
144
66
|
function computePagesNeedingClientJS(pageScan, pagesDir, resolvedConfig) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { w as ValidationError } from "../handler-
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-
|
|
1
|
+
import { w as ValidationError } from "../handler-_PqY82xe.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-4H7V_3Os.mjs";
|
|
3
3
|
export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
|