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,8 +1,27 @@
|
|
|
1
|
+
import { t as base64ToBytes } from "../../base64-DVrOndmI.mjs";
|
|
1
2
|
import { t as parseR2Conditional } from "../../r2-conditions-D1Wk8i7b.mjs";
|
|
2
3
|
import { Hono } from "hono";
|
|
3
4
|
//#region src/runtime/remote/binding-handler.ts
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/** Parse the body, answer 400 when `invalid` names a problem, and 404 for an unknown binding. */
|
|
6
|
+
async function readBindingRequest(c, env, invalid) {
|
|
7
|
+
const body = await c.req.json();
|
|
8
|
+
const error = invalid(body);
|
|
9
|
+
if (error) return c.json({ error }, 400);
|
|
10
|
+
const binding = env[body.binding];
|
|
11
|
+
if (!binding) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
12
|
+
return {
|
|
13
|
+
body,
|
|
14
|
+
binding
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function requireBinding(body) {
|
|
18
|
+
return body.binding ? void 0 : "binding required";
|
|
19
|
+
}
|
|
20
|
+
function requireKey(body) {
|
|
21
|
+
return body.binding && body.key ? void 0 : "binding and key required";
|
|
22
|
+
}
|
|
23
|
+
function r2DeleteKeys(body) {
|
|
24
|
+
return body.keys ? body.keys : body.key ? [body.key] : [];
|
|
6
25
|
}
|
|
7
26
|
/**
|
|
8
27
|
* Creates a Hono app that handles `/__void/*` routes for native binding access.
|
|
@@ -22,10 +41,9 @@ function createBindingHandler(env) {
|
|
|
22
41
|
await next();
|
|
23
42
|
});
|
|
24
43
|
app.post("/d1/query", async (c) => {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
const db =
|
|
28
|
-
if (!db) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
44
|
+
const request = await readBindingRequest(c, env, (body) => body.binding && body.sql ? void 0 : "binding and sql required");
|
|
45
|
+
if (request instanceof Response) return request;
|
|
46
|
+
const { body, binding: db } = request;
|
|
29
47
|
const stmt = db.prepare(body.sql).bind(...body.params ?? []);
|
|
30
48
|
switch (body.method) {
|
|
31
49
|
case "first": {
|
|
@@ -60,10 +78,9 @@ function createBindingHandler(env) {
|
|
|
60
78
|
}
|
|
61
79
|
});
|
|
62
80
|
app.post("/d1/batch", async (c) => {
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
const db =
|
|
66
|
-
if (!db) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
81
|
+
const request = await readBindingRequest(c, env, (body) => body.binding && Array.isArray(body.statements) ? void 0 : "binding and statements required");
|
|
82
|
+
if (request instanceof Response) return request;
|
|
83
|
+
const { body, binding: db } = request;
|
|
67
84
|
const stmts = body.statements.map((s) => db.prepare(s.sql).bind(...s.params ?? []));
|
|
68
85
|
const results = await db.batch(stmts);
|
|
69
86
|
return c.json(results.map((r) => ({
|
|
@@ -73,10 +90,9 @@ function createBindingHandler(env) {
|
|
|
73
90
|
})));
|
|
74
91
|
});
|
|
75
92
|
app.post("/kv/get", async (c) => {
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
const kv =
|
|
79
|
-
if (!kv) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
93
|
+
const request = await readBindingRequest(c, env, requireKey);
|
|
94
|
+
if (request instanceof Response) return request;
|
|
95
|
+
const { body, binding: kv } = request;
|
|
80
96
|
const type = body.type ?? "text";
|
|
81
97
|
if (type === "json") {
|
|
82
98
|
const val = await kv.get(body.key, "json");
|
|
@@ -92,37 +108,31 @@ function createBindingHandler(env) {
|
|
|
92
108
|
if (val === null) return c.json(null);
|
|
93
109
|
return new Response(val, { headers: { "content-type": "application/octet-stream" } });
|
|
94
110
|
}
|
|
95
|
-
|
|
96
|
-
if (val === null) return c.json(null);
|
|
97
|
-
return c.json(val);
|
|
111
|
+
return c.json(await kv.get(body.key, "text"));
|
|
98
112
|
});
|
|
99
113
|
app.post("/kv/put", async (c) => {
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
const kv =
|
|
103
|
-
if (!kv) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
114
|
+
const request = await readBindingRequest(c, env, requireKey);
|
|
115
|
+
if (request instanceof Response) return request;
|
|
116
|
+
const { body, binding: kv } = request;
|
|
104
117
|
const opts = {};
|
|
105
118
|
if (body.expiration) opts.expiration = body.expiration;
|
|
106
119
|
if (body.expiration_ttl) opts.expirationTtl = body.expiration_ttl;
|
|
107
120
|
let value;
|
|
108
|
-
if (body.base64 && typeof body.value === "string") value =
|
|
121
|
+
if (body.base64 && typeof body.value === "string") value = base64ToBytes(body.value).buffer;
|
|
109
122
|
else value = typeof body.value === "string" ? body.value : JSON.stringify(body.value);
|
|
110
123
|
await kv.put(body.key, value, opts);
|
|
111
124
|
return c.json({ success: true });
|
|
112
125
|
});
|
|
113
126
|
app.post("/kv/delete", async (c) => {
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
if (!kv) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
118
|
-
await kv.delete(body.key);
|
|
127
|
+
const request = await readBindingRequest(c, env, requireKey);
|
|
128
|
+
if (request instanceof Response) return request;
|
|
129
|
+
await request.binding.delete(request.body.key);
|
|
119
130
|
return c.json({ success: true });
|
|
120
131
|
});
|
|
121
132
|
app.post("/kv/list", async (c) => {
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
const kv =
|
|
125
|
-
if (!kv) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
133
|
+
const request = await readBindingRequest(c, env, requireBinding);
|
|
134
|
+
if (request instanceof Response) return request;
|
|
135
|
+
const { body, binding: kv } = request;
|
|
126
136
|
const opts = {};
|
|
127
137
|
if (body.prefix) opts.prefix = body.prefix;
|
|
128
138
|
if (body.limit) opts.limit = body.limit;
|
|
@@ -135,24 +145,21 @@ function createBindingHandler(env) {
|
|
|
135
145
|
});
|
|
136
146
|
});
|
|
137
147
|
app.post("/r2/get", async (c) => {
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
if (!bucket) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
142
|
-
const obj = await bucket.get(body.key);
|
|
148
|
+
const request = await readBindingRequest(c, env, requireKey);
|
|
149
|
+
if (request instanceof Response) return request;
|
|
150
|
+
const obj = await request.binding.get(request.body.key);
|
|
143
151
|
if (!obj) return c.json(null);
|
|
144
152
|
const headers = new Headers();
|
|
145
153
|
headers.set("content-type", obj.httpMetadata?.contentType ?? "application/octet-stream");
|
|
146
|
-
|
|
154
|
+
headers.set("content-length", String(obj.size));
|
|
147
155
|
if (obj.httpEtag) headers.set("etag", obj.httpEtag);
|
|
148
156
|
return new Response(obj.body, { headers });
|
|
149
157
|
});
|
|
150
158
|
app.on("POST", ["/r2/put", "/r2/put-conditional"], async (c) => {
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
153
|
-
const bucket =
|
|
154
|
-
|
|
155
|
-
const data = body.base64 ? decodeBase64(body.base64) : new TextEncoder().encode(body.value ?? "");
|
|
159
|
+
const request = await readBindingRequest(c, env, requireKey);
|
|
160
|
+
if (request instanceof Response) return request;
|
|
161
|
+
const { body, binding: bucket } = request;
|
|
162
|
+
const data = body.base64 ? base64ToBytes(body.base64) : new TextEncoder().encode(body.value ?? "");
|
|
156
163
|
let onlyIf;
|
|
157
164
|
try {
|
|
158
165
|
if (body.onlyIf !== void 0 || c.req.path.endsWith("/put-conditional")) onlyIf = parseR2Conditional(body.onlyIf);
|
|
@@ -177,20 +184,15 @@ function createBindingHandler(env) {
|
|
|
177
184
|
});
|
|
178
185
|
});
|
|
179
186
|
app.post("/r2/delete", async (c) => {
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
if (keys.length === 0) return c.json({ error: "key or keys required" }, 400);
|
|
184
|
-
const bucket = env[body.binding];
|
|
185
|
-
if (!bucket) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
186
|
-
await bucket.delete(keys);
|
|
187
|
+
const request = await readBindingRequest(c, env, (body) => requireBinding(body) ?? (r2DeleteKeys(body).length === 0 ? "key or keys required" : void 0));
|
|
188
|
+
if (request instanceof Response) return request;
|
|
189
|
+
await request.binding.delete(r2DeleteKeys(request.body));
|
|
187
190
|
return c.json({ success: true });
|
|
188
191
|
});
|
|
189
192
|
app.post("/r2/list", async (c) => {
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
const bucket =
|
|
193
|
-
if (!bucket) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
193
|
+
const request = await readBindingRequest(c, env, requireBinding);
|
|
194
|
+
if (request instanceof Response) return request;
|
|
195
|
+
const { body, binding: bucket } = request;
|
|
194
196
|
const opts = {};
|
|
195
197
|
if (body.prefix) opts.prefix = body.prefix;
|
|
196
198
|
if (body.limit) opts.limit = body.limit;
|
|
@@ -201,24 +203,22 @@ function createBindingHandler(env) {
|
|
|
201
203
|
objects: result.objects.map((o) => ({
|
|
202
204
|
key: o.key,
|
|
203
205
|
size: o.size,
|
|
204
|
-
lastModified: o.uploaded
|
|
206
|
+
lastModified: o.uploaded.toISOString()
|
|
205
207
|
})),
|
|
206
208
|
truncated: result.truncated,
|
|
207
209
|
cursor: result.truncated ? result.cursor : null
|
|
208
210
|
});
|
|
209
211
|
});
|
|
210
212
|
app.post("/r2/head", async (c) => {
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
const
|
|
214
|
-
if (!bucket) return c.json({ error: `unknown binding "${body.binding}"` }, 404);
|
|
215
|
-
const obj = await bucket.head(body.key);
|
|
213
|
+
const request = await readBindingRequest(c, env, requireKey);
|
|
214
|
+
if (request instanceof Response) return request;
|
|
215
|
+
const obj = await request.binding.head(request.body.key);
|
|
216
216
|
if (!obj) return c.json(null);
|
|
217
217
|
return c.json({
|
|
218
|
-
key: body.key,
|
|
218
|
+
key: request.body.key,
|
|
219
219
|
size: obj.size,
|
|
220
|
-
etag: obj.httpEtag
|
|
221
|
-
lastModified: obj.uploaded
|
|
220
|
+
etag: obj.httpEtag,
|
|
221
|
+
lastModified: obj.uploaded.toISOString(),
|
|
222
222
|
contentType: obj.httpMetadata?.contentType ?? "application/octet-stream"
|
|
223
223
|
});
|
|
224
224
|
});
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as bytesToBase64 } from "../../base64-DVrOndmI.mjs";
|
|
2
|
+
import { t as cfAccessHeaders } from "../../cf-access-BM9G0lhO.mjs";
|
|
2
3
|
import { n as serializeR2Conditional } from "../../r2-conditions-D1Wk8i7b.mjs";
|
|
3
4
|
//#region src/runtime/remote/client.ts
|
|
4
|
-
/** Base64-encode binary values for JSON transport to the proxy. */
|
|
5
|
-
function bytesToBase64(bytes) {
|
|
6
|
-
let binary = "";
|
|
7
|
-
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
8
|
-
return btoa(binary);
|
|
9
|
-
}
|
|
10
5
|
function readableMessage(value) {
|
|
11
6
|
if (typeof value !== "string") return;
|
|
12
7
|
const text = value.replace(/(?:\u001b\]|\u009d)[\s\S]*?(?:\u0007|\u001b\\|\u009c|$)/g, "").replace(/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]/g, "").replace(/[\u0000-\u001f\u007f-\u009f]/g, " ").trim();
|
|
@@ -93,32 +88,6 @@ var ProxyClient = class {
|
|
|
93
88
|
if (!res.ok) throw await proxyError(res);
|
|
94
89
|
return res;
|
|
95
90
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Send a request to the proxy and return the raw Response (for streaming).
|
|
98
|
-
* Injects `Authorization` header and `projectId` into the JSON body.
|
|
99
|
-
* Throws on non-OK responses.
|
|
100
|
-
*/
|
|
101
|
-
async stream(path, init) {
|
|
102
|
-
let body = init.body;
|
|
103
|
-
if (typeof body === "string") try {
|
|
104
|
-
const parsed = JSON.parse(body);
|
|
105
|
-
body = JSON.stringify({
|
|
106
|
-
...parsed,
|
|
107
|
-
projectId: this.projectId
|
|
108
|
-
});
|
|
109
|
-
} catch {}
|
|
110
|
-
const res = await globalThis.fetch(`${this.proxyUrl}${path}`, {
|
|
111
|
-
...init,
|
|
112
|
-
headers: {
|
|
113
|
-
...init.headers,
|
|
114
|
-
...this.authHeaders
|
|
115
|
-
},
|
|
116
|
-
body,
|
|
117
|
-
redirect: "manual"
|
|
118
|
-
});
|
|
119
|
-
if (!res.ok) throw await proxyError(res);
|
|
120
|
-
return res;
|
|
121
|
-
}
|
|
122
91
|
};
|
|
123
92
|
//#endregion
|
|
124
93
|
//#region src/runtime/remote/d1.ts
|
|
@@ -160,6 +129,12 @@ var ProxyD1Database = class {
|
|
|
160
129
|
dump() {
|
|
161
130
|
throw new Error("dump() is not supported with remote bindings");
|
|
162
131
|
}
|
|
132
|
+
withSession(_constraintOrBookmark) {
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
getBookmark() {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
163
138
|
};
|
|
164
139
|
/**
|
|
165
140
|
* D1PreparedStatement implementation backed by the remote proxy.
|
|
@@ -216,10 +191,6 @@ var ProxyD1PreparedStatement = class ProxyD1PreparedStatement {
|
|
|
216
191
|
var ProxyKVNamespace = class {
|
|
217
192
|
client;
|
|
218
193
|
binding;
|
|
219
|
-
normalizeGetOptions(options) {
|
|
220
|
-
if (typeof options === "string") return options;
|
|
221
|
-
if (options?.type === "json" || options?.type === "text" || options?.type === "arrayBuffer" || options?.type === "stream") return { type: options.type };
|
|
222
|
-
}
|
|
223
194
|
constructor(client, binding) {
|
|
224
195
|
this.client = client;
|
|
225
196
|
this.binding = binding;
|
|
@@ -231,42 +202,14 @@ var ProxyKVNamespace = class {
|
|
|
231
202
|
key,
|
|
232
203
|
type
|
|
233
204
|
});
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (ct.includes("application/json")) {
|
|
237
|
-
const data = await res.json();
|
|
238
|
-
if (data === null) return null;
|
|
239
|
-
const encoded = new TextEncoder().encode(JSON.stringify(data));
|
|
240
|
-
return type === "arrayBuffer" ? encoded.buffer : new ReadableStream({ start(controller) {
|
|
241
|
-
controller.enqueue(encoded);
|
|
242
|
-
controller.close();
|
|
243
|
-
} });
|
|
244
|
-
}
|
|
245
|
-
if (type === "arrayBuffer") return res.arrayBuffer();
|
|
246
|
-
return res.body;
|
|
247
|
-
}
|
|
248
|
-
return res.json();
|
|
205
|
+
if (type !== "arrayBuffer" && type !== "stream" || res.headers.get("content-type")?.includes("application/json")) return res.json();
|
|
206
|
+
return type === "arrayBuffer" ? res.arrayBuffer() : res.body;
|
|
249
207
|
}
|
|
250
208
|
async getWithMetadata(key, options) {
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
switch (typeof normalized === "string" ? normalized : normalized?.type) {
|
|
254
|
-
case "json":
|
|
255
|
-
value = await this.get(key, "json");
|
|
256
|
-
break;
|
|
257
|
-
case "text":
|
|
258
|
-
value = await this.get(key, "text");
|
|
259
|
-
break;
|
|
260
|
-
case "arrayBuffer":
|
|
261
|
-
value = await this.get(key, "arrayBuffer");
|
|
262
|
-
break;
|
|
263
|
-
case "stream":
|
|
264
|
-
value = await this.get(key, "stream");
|
|
265
|
-
break;
|
|
266
|
-
default: value = await this.get(key);
|
|
267
|
-
}
|
|
209
|
+
const requested = typeof options === "string" ? options : options?.type;
|
|
210
|
+
const type = requested === "json" || requested === "arrayBuffer" || requested === "stream" ? requested : "text";
|
|
268
211
|
return {
|
|
269
|
-
value,
|
|
212
|
+
value: await this.get(key, type),
|
|
270
213
|
metadata: null,
|
|
271
214
|
cacheStatus: null
|
|
272
215
|
};
|
|
@@ -328,13 +271,9 @@ var ProxyR2Bucket = class {
|
|
|
328
271
|
return makeR2Object(data);
|
|
329
272
|
}
|
|
330
273
|
async get(key) {
|
|
331
|
-
const res = await this.client.
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
body: JSON.stringify({
|
|
335
|
-
binding: this.binding,
|
|
336
|
-
key
|
|
337
|
-
})
|
|
274
|
+
const res = await this.client.fetch("/r2/get", {
|
|
275
|
+
binding: this.binding,
|
|
276
|
+
key
|
|
338
277
|
});
|
|
339
278
|
if ((res.headers.get("content-type") ?? "").includes("application/json")) {
|
|
340
279
|
if (await res.clone().json() === null) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as DevCssAsset } from "../types-BAp5AEBU.mjs";
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet } from "../protocol-
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet } from "../protocol-4H7V_3Os.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Context, ExecutionContext, Hono, MiddlewareHandler } from "hono";
|
|
5
5
|
//#region src/runtime/routing-errors.d.ts
|
|
@@ -157,7 +157,6 @@ export type RoutingContext = Context & {
|
|
|
157
157
|
};
|
|
158
158
|
export type RoutingRuntime = {
|
|
159
159
|
requestContext: AsyncLocalStorage<RequestContextStore>;
|
|
160
|
-
originalUrls: WeakMap<Request, URL>;
|
|
161
160
|
contextMiddleware: MiddlewareHandler;
|
|
162
161
|
requestMiddleware: MiddlewareHandler;
|
|
163
162
|
routingMiddleware: (rules: Array<RoutingRule>) => MiddlewareHandler;
|
|
@@ -171,9 +170,7 @@ export declare function createRoutingRuntime(app: Hono, options?: {
|
|
|
171
170
|
nodeTarget?: boolean;
|
|
172
171
|
managedDispatch?: boolean;
|
|
173
172
|
blockedAssetExtensions?: Array<string>;
|
|
174
|
-
originalUrls?: WeakMap<Request, URL>;
|
|
175
173
|
}): RoutingRuntime;
|
|
176
|
-
export declare const DEFAULT_ASSET_EXTENSIONS: Array<string>;
|
|
177
174
|
export declare function markNoMatch(request: Request, response: Response): Response;
|
|
178
175
|
export declare function createHttpRouteHandler(load: () => Promise<Record<string, (c: Context) => unknown>>, method: string): (c: Context) => Promise<Response>;
|
|
179
176
|
export declare function createModuleLoader<T>(load: () => Promise<T>, cache?: boolean): () => Promise<T>;
|