void 0.20.2 → 0.21.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 +2 -2
- package/dist/agents-gni4eqBu.mjs +111 -0
- package/dist/auth-3sGB0zJ1.mjs +22 -0
- package/dist/{auth-DPl6kck4.mjs → auth-B9_D6ygs.mjs} +6 -241
- package/dist/auth-CAw7zHqj.mjs +2 -0
- package/dist/auth-client-BWBT8HLp.mjs +6 -0
- package/dist/auth-client-Bawdj38n.d.mts +7 -0
- package/dist/auth-client-react-7GFffu8R.d.mts +7 -0
- package/dist/auth-client-react-CMLwT2xI.mjs +6 -0
- package/dist/auth-client-solid-DyTFL4cq.d.mts +7 -0
- package/dist/auth-client-solid-UoreJWZG.mjs +6 -0
- package/dist/auth-client-svelte-Cv_WvrRk.mjs +6 -0
- package/dist/auth-client-svelte-zetW0KIH.d.mts +7 -0
- package/dist/auth-client-vue-CFk7Xbv3.mjs +6 -0
- package/dist/auth-client-vue-bChShbQP.d.mts +7 -0
- package/dist/{auth-cmd-gniL2fNt.mjs → auth-cmd-MkBG2u1f.mjs} +5 -5
- package/dist/{auth-link-NZdjCmSc.mjs → auth-link-Devmv96E.mjs} +5 -5
- package/dist/{better-auth-shared-DSCeohOK.d.mts → better-auth-shared-BoVwA5Vm.d.mts} +1 -6
- package/dist/{better-auth-shared-CYw1T3k4.mjs → better-auth-shared-syGYYmnY.mjs} +1 -1
- package/dist/{build-cmd-sI18tX_O.mjs → build-cmd-DsBGwtfs.mjs} +6 -4
- package/dist/{cache-IHn5MwBC.mjs → cache-BMw8eMyF.mjs} +6 -4
- package/dist/{cancel-deploy-C5qTOdLi.mjs → cancel-deploy-B3_s9NIN.mjs} +5 -3
- package/dist/cf-access-rAZxzMkL.mjs +181 -0
- package/dist/cf-build-output-CTdlo6Rt.mjs +520 -0
- package/dist/cli/cf-compat.d.mts +1 -0
- package/dist/cli/cf-compat.mjs +934 -0
- package/dist/cli/cli.mjs +61 -38
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-DAAivdid.mjs +2 -0
- package/dist/{client-dHfSJvAN.mjs → client-PdAJ-F0t.mjs} +148 -89
- package/dist/{cloudflare-auth-6M5llVPC.mjs → cloudflare-auth-BCmTc1X_.mjs} +13 -44
- package/dist/{cloudflare-cmd-4RPGN3KB.mjs → cloudflare-cmd-D6PrKn7o.mjs} +4 -7
- package/dist/{cloudflare-connect-t1UU5svD.mjs → cloudflare-connect-DloREDlc.mjs} +6 -6
- package/dist/cloudflare-operations-BHNJVDbN.mjs +2 -0
- package/dist/{cloudflare-operations-BzWnlC1_.mjs → cloudflare-operations-CPEdHYhM.mjs} +37 -39
- package/dist/cloudflare-user-output-Q-k0QoNQ.mjs +20 -0
- package/dist/collect-DAUItMDS.mjs +2 -0
- package/dist/collect-DXHNWHcT.mjs +48 -0
- package/dist/config--T87TD8T.mjs +2 -0
- package/dist/{config-NOG_U1aK.mjs → config-BSe70f4T.mjs} +4 -6
- package/dist/config-DDIFxQYx.mjs +2 -0
- package/dist/{config-uNGuFsI2.mjs → config-Dxr6cTXn.mjs} +22 -37
- package/dist/config-DywxBLQC.d.mts +185 -0
- package/dist/config-entry.d.mts +6 -0
- package/dist/config-entry.mjs +7 -0
- package/dist/config-uP7ZDtVZ.mjs +21 -0
- package/dist/config-write-y3CBI_ux.mjs +60 -0
- package/dist/{connect-Bfk31O_8.mjs → connect-BvC9kolB.mjs} +8 -6
- package/dist/{create-project-Bk9Z0-Jg.mjs → create-project-C9lQhRzj.mjs} +9 -25
- package/dist/create-project-CI-17RVJ.mjs +2 -0
- package/dist/database-provider-Cx525bwX.mjs +6 -0
- package/dist/database-provider.mjs +1 -5
- package/dist/{db-BkRoptAt.mjs → db-R7IQgOv5.mjs} +48 -44
- package/dist/{delete-DouASY9P.mjs → delete-CghI_NXn.mjs} +6 -4
- package/dist/deploy-CYPymbtG.mjs +2 -0
- package/dist/{deploy-DTaWUS1S.mjs → deploy-H968Lo4T.mjs} +765 -197
- package/dist/discover-BBzDZe_o.mjs +2 -0
- package/dist/{discover-xvfrgJeo.mjs → discover-C4O6YxVS.mjs} +3 -8
- package/dist/{dist-BrsS7cai.mjs → dist-4WkAWhWx.mjs} +1 -15
- package/dist/{dist-m40_XgNh.mjs → dist-Bn8Kodjp.mjs} +1 -1
- package/dist/dist-C5fND3R0.mjs +2 -0
- package/dist/dist-D7-nEOXi.mjs +2 -0
- package/dist/{output-B0cfNSx5.mjs → dist-Dn6nn2IU.mjs} +3 -926
- package/dist/{domain-1RhhOVrC.mjs → domain-CITt8lC-.mjs} +7 -5
- package/dist/{route-types-Da-DpyUp.mjs → drizzle-Beb2Am5S.mjs} +1 -280
- package/dist/{email-Ce6SQq-i.mjs → email-C5kaZXzJ.mjs} +2 -2
- package/dist/{email-C-lGh51B.mjs → email-_8VmyX7V.mjs} +14 -12
- package/dist/{entry-DU3oDoQ3.mjs → entry-DdRFGK0y.mjs} +2 -2
- package/dist/{env-DJHsPE7Z.mjs → env-DV4r3nHz.mjs} +9 -7
- package/dist/{env-DBKmK4vc.mjs → env-DX_v-Q-v.mjs} +1 -1
- package/dist/env-Yz4HcvHs.mjs +78 -0
- package/dist/env-helpers--wFmQ_5Q.mjs +136 -0
- package/dist/{env-types-BNPhro-M.mjs → env-types-CWDtqHgw.mjs} +6 -2
- package/dist/{env-validation-CF6KvTRf.mjs → env-validation-BsFEXps5.mjs} +19 -28
- package/dist/env-validation-DIDGM7h4.mjs +2 -0
- package/dist/fetch-CXDChK7B.mjs +18 -0
- package/dist/fetch-_SeGZao9.d.mts +57 -0
- package/dist/fetch-stream-AOByI7Ki.mjs +81 -0
- package/dist/fetch-stream-Bjf0hoZb.d.mts +49 -0
- package/dist/gen-BBiIZw6g.mjs +2 -0
- package/dist/{gen-B_wPnVTK.mjs → gen-CFOEEc-t.mjs} +13 -11
- package/dist/{generate-RTK8_kK1.mjs → generate-C0VY6RVf.mjs} +2 -2
- package/dist/{github-cmd-PW7ZnWTp.mjs → github-cmd-jYjha2LO.mjs} +18 -22
- package/dist/{handler-D1hLsObx.d.mts → handler-BXJTXd02.d.mts} +6 -1
- package/dist/handler-DghKr6dU.mjs +150 -0
- package/dist/head-D_QRR5Yd.mjs +112 -0
- package/dist/head-client-DzmJGN4C.mjs +90 -0
- package/dist/{headers-BAHwgHdW.mjs → headers-B_HBMgi0.mjs} +2 -2
- package/dist/{help-CwOX-zmI.mjs → help-C46mnlUS.mjs} +17 -12
- package/dist/help-CS_nAsWu.mjs +2 -0
- package/dist/index.d.mts +2 -20
- package/dist/index.mjs +116 -60
- package/dist/{init-BWZ7q5Z4.mjs → init-CSXmvxKu.mjs} +49 -50
- package/dist/{link-Rmvu2Wl_.mjs → link-DxMOALXk.mjs} +7 -5
- package/dist/{list-DEE2S6mY.mjs → list-0wQs0oYg.mjs} +7 -5
- package/dist/live-CB1y5IuC.mjs +411 -0
- package/dist/live-CKiJilLr.d.mts +105 -0
- package/dist/local-d1-DzykTWY8.mjs +104 -0
- package/dist/{login-Uvferzmm.mjs → login-CKk5NX4d.mjs} +6 -11
- package/dist/login-Ch9cgWRF.mjs +2 -0
- package/dist/{logs-27FenuiC.mjs → logs-hxWBSoej.mjs} +6 -4
- package/dist/migrate-CLty4mZR.mjs +2 -0
- package/dist/migrate-DcW8F2W8.mjs +285 -0
- package/dist/migration-handler-DM4clYj5.d.mts +51 -0
- package/dist/{neon-DHwd2zvC.mjs → neon-n74ta1Pr.mjs} +1 -1
- package/dist/{node-Ez5KW5rn.mjs → node-Cupyf7-s.mjs} +6 -6
- package/dist/{operator-auth-B3e08unv.mjs → operator-auth-BkVgJqv-.mjs} +2 -2
- package/dist/{operator-client-LUZnlnYk.mjs → operator-client-A0iex2yi.mjs} +2 -1
- package/dist/{operator-cmd-CjOTmAYE.mjs → operator-cmd-BEUYhaHB.mjs} +6 -6
- package/dist/output-urU86XeT.mjs +146 -0
- package/dist/{package-json-CPoWX79C.mjs → package-json-iCbMg5XF.mjs} +1 -1
- package/dist/pages/client.d.mts +5 -2
- package/dist/pages/client.mjs +5 -3
- package/dist/pages/head-client.mjs +1 -89
- package/dist/pages/head.mjs +1 -111
- package/dist/pages/index.d.mts +2 -3
- package/dist/pages/index.mjs +7 -7
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/prefetch.d.mts +2 -30
- package/dist/pages/prefetch.mjs +1 -89
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +3 -3
- package/dist/pages/serialize.d.mts +2 -9
- package/dist/pages/serialize.mjs +1 -13
- package/dist/plan-BEZ8VJW0.mjs +256 -0
- package/dist/plan-DpuOr14e.mjs +2 -0
- package/dist/{platform-auth-config-DrbQXXiW.mjs → platform-auth-config-Df6yVw-e.mjs} +6 -6
- package/dist/{platform-auth-protection-Bhtvp0B_.mjs → platform-auth-protection-Jb0yftay.mjs} +7 -5
- package/dist/{platform-auth-recovery-CeOKGVeJ.mjs → platform-auth-recovery-DmRyIfW0.mjs} +6 -5
- package/dist/platform-cmd-C9Vt7m-d.mjs +2 -0
- package/dist/{platform-cmd-BFhieCdV.mjs → platform-cmd-DRxCOTwy.mjs} +8 -5
- package/dist/{platform-domain-C74PULqV.mjs → platform-domain-IjiXgrXJ.mjs} +4 -3
- package/dist/{platform-lifecycle-BwAIgz-t.mjs → platform-lifecycle-BquAaU-5.mjs} +263 -56
- package/dist/platform-lifecycle-CuJIZNvA.mjs +2 -0
- package/dist/{platform-management-COogu_Se.mjs → platform-management-CCQKGsq4.mjs} +12 -7
- package/dist/platform-management-Cgyed0WY.mjs +2 -0
- package/dist/{platform-recovery-ewqLefp1.mjs → platform-recovery-DS8ih1SW.mjs} +3 -3
- package/dist/platform-registry-BJbgZLS1.mjs +431 -0
- package/dist/{plugin-inference-BDRfZngg.mjs → plugin-inference-DsvtJLll.mjs} +4 -4
- package/dist/prefetch-Bsc_Pb6c.mjs +90 -0
- package/dist/prefetch-Ce6la4EI.d.mts +31 -0
- package/dist/{prepare-blNRQvQl.mjs → prepare-CaUxODOU.mjs} +3 -2
- package/dist/prepare-D4CkM3_v.mjs +2 -0
- package/dist/{prepare-CtDJjoOj.mjs → prepare-pcWcxSCh.mjs} +13 -11
- package/dist/prerender-render-Cf_WDE9W.mjs +111 -0
- package/dist/prerender-render.mjs +1 -110
- package/dist/{preset-lAy0B0BQ.mjs → preset-Dowh9tTt.mjs} +16 -118
- package/dist/project-BEBFDFLz.mjs +2 -0
- package/dist/project-CWNIPoXc.mjs +209 -0
- package/dist/{project-cmd-DmZK9Hxf.mjs → project-cmd-2lN--YAX.mjs} +18 -16
- package/dist/{project-paths-SK8nMHPp.mjs → project-paths-CKQ-Q5JS.mjs} +47 -14
- package/dist/project-slug-23TpquG4.mjs +8 -0
- package/dist/project-slug-DofjTFd-.mjs +2 -0
- package/dist/{project-team-D8jOJMUJ.mjs → project-team-Dapn9HZn.mjs} +9 -5
- package/dist/{project-token-DA34bf-C.mjs → project-token-C90v9SJK.mjs} +6 -4
- package/dist/{project-tsconfig-Ql2XsSQp.mjs → project-tsconfig-CwfqUnVp.mjs} +2 -2
- package/dist/{protocol-C-pqYJjE.d.mts → protocol-ZH3jP4a7.d.mts} +1 -1
- package/dist/providers-BNKRacMr.d.mts +7 -0
- package/dist/provision-CNgEBkVA.mjs +3 -0
- package/dist/{provision-CSJOjjQk.mjs → provision-Cck2m3jJ.mjs} +11 -25
- package/dist/queues-BWKt1Xo4.d.mts +7 -0
- package/dist/{requests-CUExwGQQ.mjs → requests-CzX46I0i.mjs} +5 -3
- package/dist/resolve-project-BTotl8Nn.mjs +2 -0
- package/dist/{resolve-project--Vxawf7z.mjs → resolve-project-Xvis70DG.mjs} +2 -8
- package/dist/response-Tn7rU0MV.mjs +30 -0
- package/dist/{rollback-CDNGU1gr.mjs → rollback-BEeyc73H.mjs} +6 -4
- package/dist/{rolldown-runtime-rQ84J-ij.mjs → rolldown-runtime-DXIUcv95.mjs} +1 -10
- package/dist/route-types-Id82-veQ.mjs +280 -0
- package/dist/{local-d1-D2I6Ox5F.mjs → runner-BGVsGgkb.mjs} +6 -114
- package/dist/runner-CQs_cDSG.mjs +2 -0
- package/dist/runner-mysql-1o47achK.mjs +2 -0
- package/dist/{runner-mysql-7BPUNGmL.mjs → runner-mysql-BhwMk2Bm.mjs} +2 -9
- package/dist/{runner-pg-BkEza-dX.mjs → runner-pg-CJ_JeGF6.mjs} +2 -9
- package/dist/runner-pg-D7z01mQS.mjs +2 -0
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth-client-react.d.mts +2 -6
- package/dist/runtime/auth-client-react.mjs +1 -5
- package/dist/runtime/auth-client-solid.d.mts +2 -6
- package/dist/runtime/auth-client-solid.mjs +1 -5
- package/dist/runtime/auth-client-svelte.d.mts +2 -6
- package/dist/runtime/auth-client-svelte.mjs +1 -5
- package/dist/runtime/auth-client-vue.d.mts +2 -6
- package/dist/runtime/auth-client-vue.mjs +1 -5
- package/dist/runtime/auth-client.d.mts +2 -6
- package/dist/runtime/auth-client.mjs +1 -5
- package/dist/runtime/auth.mjs +1 -21
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +3 -3
- package/dist/runtime/client-react.mjs +3 -3
- package/dist/runtime/client-solid.d.mts +3 -3
- package/dist/runtime/client-solid.mjs +3 -3
- package/dist/runtime/client-svelte.d.mts +3 -3
- package/dist/runtime/client-svelte.mjs +3 -3
- package/dist/runtime/client-vue.d.mts +3 -3
- package/dist/runtime/client-vue.mjs +3 -3
- package/dist/runtime/client.d.mts +3 -3
- package/dist/runtime/client.mjs +3 -3
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-helpers.mjs +1 -135
- package/dist/runtime/env-public-client.mjs +1 -1
- package/dist/runtime/env-public.mjs +2 -2
- package/dist/runtime/env.mjs +1 -77
- package/dist/runtime/fetch-stream.d.mts +2 -49
- package/dist/runtime/fetch-stream.mjs +2 -80
- package/dist/runtime/fetch.d.mts +2 -57
- package/dist/runtime/fetch.mjs +2 -17
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -149
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +2 -2
- package/dist/runtime/live.d.mts +2 -104
- package/dist/runtime/live.mjs +1 -410
- package/dist/runtime/migration-handler-mysql.d.mts +1 -1
- package/dist/runtime/migration-handler-pg.d.mts +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -50
- package/dist/runtime/queues.d.mts +2 -6
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/index.mjs +49 -8
- package/dist/runtime/response.mjs +1 -29
- package/dist/runtime/sandbox.d.mts +4 -56
- package/dist/runtime/sandbox.mjs +82 -221
- package/dist/runtime/sse.mjs +1 -171
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -71
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +2 -2
- package/dist/runtime/ws.d.mts +2 -121
- package/dist/{scan-CpK-57ug.mjs → scan-DJbooZm2.mjs} +3 -3
- package/dist/{scan-BMH4rzlv.mjs → scan-DdDvRCU1.mjs} +8 -26
- package/dist/{secret-Bzzi2e9E.mjs → secret-wnTel5Yw.mjs} +8 -6
- package/dist/serialize-BPvnNQuA.mjs +14 -0
- package/dist/serialize-CfSwWfF2.d.mts +10 -0
- package/dist/{skills-C0RvGjeE.mjs → skills-B-690E7h.mjs} +3 -2
- package/dist/sse-BaC1jXko.mjs +172 -0
- package/dist/{subcommand-prompt-Bmyn5Rlc.mjs → subcommand-prompt-Gj3VzLIh.mjs} +2 -1
- package/dist/sveltekit.d.mts +2 -1
- package/dist/sveltekit.mjs +3 -2
- package/dist/validate-DqJ33oHj.mjs +2 -0
- package/dist/validate-qNhV00PD.mjs +180 -0
- package/dist/validator-BTOu0fB0.mjs +72 -0
- package/dist/{wrangler--imS8n0d.mjs → wrangler-D01qs6VB.mjs} +259 -71
- package/dist/ws-BwcqizuH.d.mts +122 -0
- package/dist/{yarn-pnp-DxSInkzL.mjs → yarn-pnp-CVEc3gE7.mjs} +1 -1
- package/package.json +19 -8
- package/skills/void/SKILL.md +7 -5
- package/skills/void/docs/guide/ai.md +3 -3
- package/skills/void/docs/guide/app-types.md +12 -11
- package/skills/void/docs/guide/auth.md +2 -2
- package/skills/void/docs/guide/database/d1.md +1 -1
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +3 -3
- package/skills/void/docs/guide/deployment.md +16 -16
- package/skills/void/docs/guide/durable-state.md +2 -2
- package/skills/void/docs/guide/edge/headers.md +3 -3
- package/skills/void/docs/guide/edge/prerendering.md +1 -1
- package/skills/void/docs/guide/edge/redirects.md +4 -4
- package/skills/void/docs/guide/edge/revalidation.md +6 -6
- package/skills/void/docs/guide/edge/rewrites.md +28 -27
- package/skills/void/docs/guide/edge/static-assets.md +1 -1
- package/skills/void/docs/guide/email.md +27 -25
- package/skills/void/docs/guide/env-migration.md +1 -1
- package/skills/void/docs/guide/index.md +1 -1
- package/skills/void/docs/guide/pages-routing/head.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +171 -0
- package/skills/void/docs/guide/platform/administration/email.md +121 -0
- package/skills/void/docs/guide/platform/administration/operations.md +97 -0
- package/skills/void/docs/guide/platform/administration/projects.md +56 -0
- package/skills/void/docs/guide/platform/development/local.md +119 -0
- package/skills/void/docs/guide/platform/development/runtime.md +124 -0
- package/skills/void/docs/guide/platform/development/schema-ci.md +95 -0
- package/skills/void/docs/guide/platform/installation/ci.md +58 -0
- package/skills/void/docs/guide/platform/installation/credentials.md +90 -0
- package/skills/void/docs/guide/platform/installation/domains.md +68 -0
- package/skills/void/docs/guide/platform/installation/first-deployment.md +82 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +137 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +88 -0
- package/skills/void/docs/guide/platform/installation/setup.md +169 -0
- package/skills/void/docs/guide/platform/installation/uninstall.md +54 -0
- package/skills/void/docs/guide/platform-administration.md +6 -414
- package/skills/void/docs/guide/platform-development.md +5 -316
- package/skills/void/docs/guide/project-collaboration.md +1 -1
- package/skills/void/docs/guide/remote-dev.md +2 -2
- package/skills/void/docs/guide/sandboxes.md +10 -25
- package/skills/void/docs/guide/self-hosted-platform.md +11 -694
- package/skills/void/docs/guide/ssg.md +1 -1
- package/skills/void/docs/guide/websockets.md +1 -1
- package/skills/void/docs/integrations/cloudflare.md +86 -84
- package/skills/void/docs/integrations/frameworks/analog.md +14 -9
- package/skills/void/docs/integrations/frameworks/astro.md +14 -10
- package/skills/void/docs/integrations/frameworks/nuxt.md +14 -9
- package/skills/void/docs/integrations/frameworks/overview.md +35 -29
- package/skills/void/docs/integrations/frameworks/react-router.md +1 -1
- package/skills/void/docs/integrations/frameworks/sveltekit.md +33 -30
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +1 -1
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -5
- package/skills/void/docs/reference/api.md +55 -38
- package/skills/void/docs/reference/cli.md +60 -34
- package/skills/void/docs/reference/config.md +57 -34
- package/skills/void/docs/reference/resource-inference.md +10 -10
- package/skills/void/docs/reference/structure.md +2 -2
- package/dist/validate-tBBN_dXH.mjs +0 -505
package/dist/runtime/sse.mjs
CHANGED
|
@@ -1,172 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
const DEFAULT_KEEP_ALIVE_INTERVAL_MS = 15e3;
|
|
3
|
-
const DEFAULT_KEEP_ALIVE_COMMENT = "keep-alive";
|
|
4
|
-
var SseStreamClosedError = class extends Error {
|
|
5
|
-
constructor(message = "sse: stream is closed.") {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = "SseStreamClosedError";
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
function formatSse(message) {
|
|
11
|
-
const textMessage = {
|
|
12
|
-
event: message.event,
|
|
13
|
-
id: message.id,
|
|
14
|
-
retry: message.retry
|
|
15
|
-
};
|
|
16
|
-
if ("data" in message) textMessage.data = serializeData(message.data);
|
|
17
|
-
return formatSseText(textMessage);
|
|
18
|
-
}
|
|
19
|
-
function formatSseText(message) {
|
|
20
|
-
const lines = [];
|
|
21
|
-
if (message.id != null) {
|
|
22
|
-
assertControlField("id", message.id);
|
|
23
|
-
lines.push(`id: ${message.id}`);
|
|
24
|
-
}
|
|
25
|
-
if (message.event != null) {
|
|
26
|
-
assertControlField("event", message.event);
|
|
27
|
-
lines.push(`event: ${message.event}`);
|
|
28
|
-
}
|
|
29
|
-
if (message.retry != null) {
|
|
30
|
-
assertRetry(message.retry);
|
|
31
|
-
lines.push(`retry: ${message.retry}`);
|
|
32
|
-
}
|
|
33
|
-
if ("data" in message) {
|
|
34
|
-
if (typeof message.data !== "string") throw new Error("sse: data must be a string.");
|
|
35
|
-
for (const line of splitLines(message.data)) lines.push(`data: ${line}`);
|
|
36
|
-
}
|
|
37
|
-
return `${lines.join("\n")}\n\n`;
|
|
38
|
-
}
|
|
39
|
-
function getLastEventId(request) {
|
|
40
|
-
return request.headers.get("Last-Event-ID");
|
|
41
|
-
}
|
|
42
|
-
function eventStream(start, options = {}) {
|
|
43
|
-
const encoder = new TextEncoder();
|
|
44
|
-
const { readable, writable } = new TransformStream();
|
|
45
|
-
const writer = writable.getWriter();
|
|
46
|
-
const signalController = new AbortController();
|
|
47
|
-
const headers = buildSseHeaders(options.headers);
|
|
48
|
-
const keepAlive = normalizeKeepAlive(options.keepAlive);
|
|
49
|
-
let keepAliveTimer;
|
|
50
|
-
let closedOnce = false;
|
|
51
|
-
let closeResolve;
|
|
52
|
-
const closed = new Promise((resolve) => {
|
|
53
|
-
closeResolve = resolve;
|
|
54
|
-
});
|
|
55
|
-
const markClosed = () => {
|
|
56
|
-
if (closedOnce) return;
|
|
57
|
-
closedOnce = true;
|
|
58
|
-
if (!signalController.signal.aborted) signalController.abort();
|
|
59
|
-
if (keepAliveTimer != null) {
|
|
60
|
-
clearInterval(keepAliveTimer);
|
|
61
|
-
keepAliveTimer = void 0;
|
|
62
|
-
}
|
|
63
|
-
closeResolve();
|
|
64
|
-
};
|
|
65
|
-
async function close() {
|
|
66
|
-
if (closedOnce) return;
|
|
67
|
-
markClosed();
|
|
68
|
-
await writer.close().catch(() => {});
|
|
69
|
-
}
|
|
70
|
-
async function fail(error) {
|
|
71
|
-
if (closedOnce) return;
|
|
72
|
-
markClosed();
|
|
73
|
-
await writer.abort(error).catch(() => {});
|
|
74
|
-
}
|
|
75
|
-
async function write(text) {
|
|
76
|
-
if (closedOnce) throw new SseStreamClosedError();
|
|
77
|
-
try {
|
|
78
|
-
await writer.write(encoder.encode(text));
|
|
79
|
-
} catch {
|
|
80
|
-
await close();
|
|
81
|
-
throw new SseStreamClosedError();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const stream = {
|
|
85
|
-
signal: signalController.signal,
|
|
86
|
-
closed,
|
|
87
|
-
send(message) {
|
|
88
|
-
return write(formatSse(message));
|
|
89
|
-
},
|
|
90
|
-
comment(text = "") {
|
|
91
|
-
return write(formatComment(text));
|
|
92
|
-
},
|
|
93
|
-
close
|
|
94
|
-
};
|
|
95
|
-
writer.closed.catch(() => {
|
|
96
|
-
close();
|
|
97
|
-
});
|
|
98
|
-
if (options.signal?.aborted) close();
|
|
99
|
-
else options.signal?.addEventListener("abort", () => void close(), { once: true });
|
|
100
|
-
if (keepAlive) keepAliveTimer = setInterval(() => {
|
|
101
|
-
stream.comment(keepAlive.comment).catch(() => close());
|
|
102
|
-
}, keepAlive.intervalMs);
|
|
103
|
-
queueMicrotask(() => {
|
|
104
|
-
(async () => {
|
|
105
|
-
try {
|
|
106
|
-
await start(stream);
|
|
107
|
-
await close();
|
|
108
|
-
} catch (error) {
|
|
109
|
-
await fail(error);
|
|
110
|
-
}
|
|
111
|
-
})();
|
|
112
|
-
});
|
|
113
|
-
return new Response(readable, { headers });
|
|
114
|
-
}
|
|
115
|
-
function buildSseHeaders(headers) {
|
|
116
|
-
const result = new Headers(headers);
|
|
117
|
-
if (!result.has("Content-Type")) result.set("Content-Type", "text/event-stream; charset=utf-8");
|
|
118
|
-
if (!result.has("Cache-Control")) result.set("Cache-Control", "no-cache, no-transform");
|
|
119
|
-
if (!result.has("X-Accel-Buffering")) result.set("X-Accel-Buffering", "no");
|
|
120
|
-
return result;
|
|
121
|
-
}
|
|
122
|
-
function normalizeKeepAlive(keepAlive) {
|
|
123
|
-
if (keepAlive === false) return null;
|
|
124
|
-
if (keepAlive === true || keepAlive == null) return {
|
|
125
|
-
intervalMs: DEFAULT_KEEP_ALIVE_INTERVAL_MS,
|
|
126
|
-
comment: DEFAULT_KEEP_ALIVE_COMMENT
|
|
127
|
-
};
|
|
128
|
-
const intervalMs = keepAlive.intervalMs ?? DEFAULT_KEEP_ALIVE_INTERVAL_MS;
|
|
129
|
-
if (!Number.isFinite(intervalMs) || intervalMs <= 0) throw new Error("sse: keepAlive.intervalMs must be a positive finite number.");
|
|
130
|
-
return {
|
|
131
|
-
intervalMs,
|
|
132
|
-
comment: keepAlive.comment ?? DEFAULT_KEEP_ALIVE_COMMENT
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function formatComment(text) {
|
|
136
|
-
if (typeof text !== "string") throw new Error("sse: comment text must be a string.");
|
|
137
|
-
return `${splitLines(text).map((line) => `: ${line}`).join("\n")}\n\n`;
|
|
138
|
-
}
|
|
139
|
-
function assertControlField(name, value) {
|
|
140
|
-
if (typeof value !== "string") throw new Error(`sse: ${name} must be a string.`);
|
|
141
|
-
if (hasControlFieldSeparator(value)) throw new Error(`sse: ${name} must not contain CR, LF, or NUL characters.`);
|
|
142
|
-
}
|
|
143
|
-
function hasControlFieldSeparator(value) {
|
|
144
|
-
return value.includes("\r") || value.includes("\n") || value.includes("\0");
|
|
145
|
-
}
|
|
146
|
-
function assertRetry(value) {
|
|
147
|
-
if (!Number.isInteger(value) || value < 0) throw new Error("sse: retry must be a non-negative integer.");
|
|
148
|
-
}
|
|
149
|
-
function isBinaryData(data) {
|
|
150
|
-
return data instanceof ArrayBuffer || ArrayBuffer.isView(data) || typeof Blob !== "undefined" && data instanceof Blob || typeof File !== "undefined" && data instanceof File;
|
|
151
|
-
}
|
|
152
|
-
function serializeData(data) {
|
|
153
|
-
if (typeof data === "string") return data;
|
|
154
|
-
if (data == null) return data === null ? "null" : throwDataSerializationError(data);
|
|
155
|
-
if (typeof data === "function" || typeof data === "symbol") return throwDataSerializationError(data);
|
|
156
|
-
if (isBinaryData(data)) throw new Error("sse: binary data is not supported.");
|
|
157
|
-
try {
|
|
158
|
-
const serialized = JSON.stringify(data);
|
|
159
|
-
if (typeof serialized !== "string") return throwDataSerializationError(data);
|
|
160
|
-
return serialized;
|
|
161
|
-
} catch (error) {
|
|
162
|
-
throw new Error(`sse: data must be JSON-serializable. ${error instanceof Error ? error.message : String(error)}`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
function throwDataSerializationError(data) {
|
|
166
|
-
throw new Error(`sse: unsupported data value ${String(data)}.`);
|
|
167
|
-
}
|
|
168
|
-
function splitLines(value) {
|
|
169
|
-
return value.split(/\r\n|\r|\n/);
|
|
170
|
-
}
|
|
171
|
-
//#endregion
|
|
1
|
+
import { a as getLastEventId, i as formatSseText, n as eventStream, r as formatSse, t as SseStreamClosedError } from "../sse-BaC1jXko.mjs";
|
|
172
2
|
export { SseStreamClosedError, eventStream, formatSse, formatSseText, getLastEventId };
|
package/dist/runtime/storage.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-
|
|
1
|
+
import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-BXJTXd02.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
function flattenIssues(issues) {
|
|
3
|
-
return Array.from(issues, (issue) => ({
|
|
4
|
-
message: issue.message,
|
|
5
|
-
path: issue.path?.map((p) => typeof p === "object" ? p.key : p).join(".")
|
|
6
|
-
}));
|
|
7
|
-
}
|
|
8
|
-
async function validateSlot(schema, value) {
|
|
9
|
-
const result = await schema["~standard"].validate(value);
|
|
10
|
-
if (result.issues) return {
|
|
11
|
-
ok: false,
|
|
12
|
-
issues: result.issues
|
|
13
|
-
};
|
|
14
|
-
return {
|
|
15
|
-
ok: true,
|
|
16
|
-
value: result.value
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
async function runValidation(validators, c) {
|
|
20
|
-
const input = {};
|
|
21
|
-
const allIssues = [];
|
|
22
|
-
if (validators.params) {
|
|
23
|
-
const raw = c.req.param();
|
|
24
|
-
const result = await validateSlot(validators.params, raw);
|
|
25
|
-
if (result.ok) input.params = result.value;
|
|
26
|
-
else allIssues.push({
|
|
27
|
-
slot: "params",
|
|
28
|
-
issues: flattenIssues(result.issues)
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
if (validators.query) {
|
|
32
|
-
const url = new URL(c.req.url);
|
|
33
|
-
const raw = {};
|
|
34
|
-
for (const [key, value] of url.searchParams) raw[key] = value;
|
|
35
|
-
const result = await validateSlot(validators.query, raw);
|
|
36
|
-
if (result.ok) input.query = result.value;
|
|
37
|
-
else allIssues.push({
|
|
38
|
-
slot: "query",
|
|
39
|
-
issues: flattenIssues(result.issues)
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if (validators.body) {
|
|
43
|
-
let raw;
|
|
44
|
-
try {
|
|
45
|
-
raw = await c.req.json();
|
|
46
|
-
} catch {
|
|
47
|
-
return {
|
|
48
|
-
ok: false,
|
|
49
|
-
response: Response.json({ error: "Invalid JSON body" }, { status: 400 })
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
const result = await validateSlot(validators.body, raw);
|
|
53
|
-
if (result.ok) input.body = result.value;
|
|
54
|
-
else allIssues.push({
|
|
55
|
-
slot: "body",
|
|
56
|
-
issues: flattenIssues(result.issues)
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
if (allIssues.length > 0) return {
|
|
60
|
-
ok: false,
|
|
61
|
-
response: Response.json({
|
|
62
|
-
error: "Validation failed",
|
|
63
|
-
issues: allIssues
|
|
64
|
-
}, { status: 400 })
|
|
65
|
-
};
|
|
66
|
-
return {
|
|
67
|
-
ok: true,
|
|
68
|
-
input
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
1
|
+
import { t as runValidation } from "../validator-BTOu0fB0.mjs";
|
|
72
2
|
export { runValidation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as AuthState } from "../auth-DkcFflXV.mjs";
|
|
2
|
-
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-
|
|
3
|
-
import { AnyWebSocketDefinition } from "
|
|
2
|
+
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-BoVwA5Vm.mjs";
|
|
3
|
+
import { t as AnyWebSocketDefinition } from "../ws-BwcqizuH.mjs";
|
|
4
4
|
//#region src/runtime/ws-server.d.ts
|
|
5
5
|
export type WebSocketRouteMeta = {
|
|
6
6
|
pattern: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { authContext } from "
|
|
2
|
-
import { withRuntimeEnv } from "
|
|
1
|
+
import { t as authContext } from "../auth-3sGB0zJ1.mjs";
|
|
2
|
+
import { o as withRuntimeEnv } from "../env-Yz4HcvHs.mjs";
|
|
3
3
|
//#region src/runtime/ws-server.ts
|
|
4
4
|
function matchRoute(pattern, pathname) {
|
|
5
5
|
const patternSegments = pattern.split("/").filter(Boolean);
|
package/dist/runtime/ws.d.mts
CHANGED
|
@@ -1,121 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
3
|
-
import { a as CloudEnv } from "../handler-D1hLsObx.mjs";
|
|
4
|
-
import { WebSocketRouteMap } from "void/routes";
|
|
5
|
-
//#region src/runtime/ws.d.ts
|
|
6
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
7
|
-
type ParamsRecord = Record<string, string>;
|
|
8
|
-
type WsEntry<P extends keyof WebSocketRouteMap> = WebSocketRouteMap[P];
|
|
9
|
-
type ParamsOf<P extends keyof WebSocketRouteMap> = WsEntry<P> extends {
|
|
10
|
-
params: infer T;
|
|
11
|
-
} ? T : Record<string, never>;
|
|
12
|
-
type ClientEventOf<P extends keyof WebSocketRouteMap> = WsEntry<P> extends {
|
|
13
|
-
client: infer T;
|
|
14
|
-
} ? T : never;
|
|
15
|
-
type ServerEventOf<P extends keyof WebSocketRouteMap> = WsEntry<P> extends {
|
|
16
|
-
server: infer T;
|
|
17
|
-
} ? T : never;
|
|
18
|
-
type HasParams<P extends keyof WebSocketRouteMap> = ParamsOf<P> extends Record<string, never> ? false : [keyof ParamsOf<P>] extends [never] ? false : true;
|
|
19
|
-
export type WebSocketConnection<ServerEvent = unknown> = {
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly state: unknown;
|
|
22
|
-
send(event: ServerEvent): Promise<void>;
|
|
23
|
-
close(code?: number, reason?: string): void;
|
|
24
|
-
setState(data: unknown): void;
|
|
25
|
-
};
|
|
26
|
-
export type RoomController<ServerEvent = unknown> = {
|
|
27
|
-
broadcast(event: ServerEvent, excludeIds?: Array<string>): Promise<void>;
|
|
28
|
-
getConnections(): Iterable<WebSocketConnection<ServerEvent>>;
|
|
29
|
-
getConnection(id: string): WebSocketConnection<ServerEvent> | undefined;
|
|
30
|
-
};
|
|
31
|
-
export type WebSocketBaseContext = {
|
|
32
|
-
readonly id: string;
|
|
33
|
-
readonly params: ParamsRecord;
|
|
34
|
-
readonly user: AuthUser | null;
|
|
35
|
-
readonly request: Request;
|
|
36
|
-
readonly env: CloudEnv["Bindings"];
|
|
37
|
-
readonly storage: DurableObjectStorage;
|
|
38
|
-
};
|
|
39
|
-
export type RoomContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
40
|
-
readonly room: RoomController<ServerEvent>;
|
|
41
|
-
readonly connection: WebSocketConnection<ServerEvent>;
|
|
42
|
-
};
|
|
43
|
-
export type SocketContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
44
|
-
readonly socket: WebSocketConnection<ServerEvent>;
|
|
45
|
-
};
|
|
46
|
-
export type RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
47
|
-
readonly __kind: "room";
|
|
48
|
-
readonly messages: {
|
|
49
|
-
client: ClientSchema;
|
|
50
|
-
server: ServerSchema;
|
|
51
|
-
};
|
|
52
|
-
onBeforeConnect?: (ctx: RoomContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response | void>;
|
|
53
|
-
onConnect?: (ctx: RoomContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<void>;
|
|
54
|
-
onMessage?: (ctx: RoomContext<StandardSchemaV1.InferInput<ServerSchema>>, event: StandardSchemaV1.InferOutput<ClientSchema>) => MaybePromise<void>;
|
|
55
|
-
onClose?: (ctx: RoomContext<StandardSchemaV1.InferInput<ServerSchema>>, details?: {
|
|
56
|
-
code: number;
|
|
57
|
-
reason: string;
|
|
58
|
-
wasClean: boolean;
|
|
59
|
-
}) => MaybePromise<void>;
|
|
60
|
-
onRequest?: (ctx: RoomContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response>;
|
|
61
|
-
};
|
|
62
|
-
export type SocketDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
63
|
-
readonly __kind: "socket";
|
|
64
|
-
readonly messages: {
|
|
65
|
-
client: ClientSchema;
|
|
66
|
-
server: ServerSchema;
|
|
67
|
-
};
|
|
68
|
-
onBeforeConnect?: (ctx: SocketContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response | void>;
|
|
69
|
-
onConnect?: (ctx: SocketContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<void>;
|
|
70
|
-
onMessage?: (ctx: SocketContext<StandardSchemaV1.InferInput<ServerSchema>>, event: StandardSchemaV1.InferOutput<ClientSchema>) => MaybePromise<void>;
|
|
71
|
-
onClose?: (ctx: SocketContext<StandardSchemaV1.InferInput<ServerSchema>>, details?: {
|
|
72
|
-
code: number;
|
|
73
|
-
reason: string;
|
|
74
|
-
wasClean: boolean;
|
|
75
|
-
}) => MaybePromise<void>;
|
|
76
|
-
onRequest?: (ctx: SocketContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response>;
|
|
77
|
-
};
|
|
78
|
-
export type AnyWebSocketDefinition = RoomDefinition | SocketDefinition;
|
|
79
|
-
export declare function defineRoom<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<RoomDefinition<ClientSchema, ServerSchema>, "__kind">): RoomDefinition<ClientSchema, ServerSchema>;
|
|
80
|
-
export declare function defineWebSocket<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<SocketDefinition<ClientSchema, ServerSchema>, "__kind">): SocketDefinition<ClientSchema, ServerSchema>;
|
|
81
|
-
export type VoidSocketCloseEvent = {
|
|
82
|
-
code?: number;
|
|
83
|
-
reason?: string;
|
|
84
|
-
wasClean?: boolean;
|
|
85
|
-
};
|
|
86
|
-
export type ConnectCommonOptions = {
|
|
87
|
-
baseURL?: string;
|
|
88
|
-
reconnect?: boolean;
|
|
89
|
-
reconnectDelayMs?: number;
|
|
90
|
-
maxReconnectAttempts?: number;
|
|
91
|
-
protocols?: string | Array<string>;
|
|
92
|
-
};
|
|
93
|
-
type ConnectOptions<P extends keyof WebSocketRouteMap> = ConnectCommonOptions & (HasParams<P> extends true ? {
|
|
94
|
-
params: ParamsOf<P>;
|
|
95
|
-
} : {
|
|
96
|
-
params?: never;
|
|
97
|
-
});
|
|
98
|
-
type ListenerMap<ServerEvent> = {
|
|
99
|
-
message: (event: ServerEvent) => void;
|
|
100
|
-
open: () => void;
|
|
101
|
-
close: (event: VoidSocketCloseEvent) => void;
|
|
102
|
-
error: (error: unknown) => void;
|
|
103
|
-
};
|
|
104
|
-
export declare class VoidSocket<P extends keyof WebSocketRouteMap & string> {
|
|
105
|
-
private readonly url;
|
|
106
|
-
private readonly options;
|
|
107
|
-
private socket;
|
|
108
|
-
private readonly listeners;
|
|
109
|
-
private readonly buffer;
|
|
110
|
-
private reconnectAttempts;
|
|
111
|
-
private closedByUser;
|
|
112
|
-
constructor(url: string, options: ConnectCommonOptions);
|
|
113
|
-
private emit;
|
|
114
|
-
private connect;
|
|
115
|
-
send(event: ClientEventOf<P>): void;
|
|
116
|
-
close(code?: number, reason?: string): void;
|
|
117
|
-
on<K extends keyof ListenerMap<ServerEventOf<P>>>(type: K, handler: ListenerMap<ServerEventOf<P>>[K]): () => void;
|
|
118
|
-
}
|
|
119
|
-
export declare function connect<P extends keyof WebSocketRouteMap & string>(path: HasParams<P> extends false ? P : never): VoidSocket<P>;
|
|
120
|
-
export declare function connect<P extends keyof WebSocketRouteMap & string>(path: P, options: ConnectOptions<P>): VoidSocket<P>;
|
|
121
|
-
//#endregion
|
|
1
|
+
import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as connect, i as RoomController, l as VoidSocketCloseEvent, m as defineWebSocket, n as ConnectCommonOptions, o as SocketContext, p as defineRoom, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-BwcqizuH.mjs";
|
|
2
|
+
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, connect, defineRoom, defineWebSocket };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { t as glob } from "./dist-
|
|
1
|
+
import { a as join, n as dirname, r as extname, t as basename } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-CKQ-Q5JS.mjs";
|
|
3
|
+
import { t as glob } from "./dist-Bn8Kodjp.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/router/parse-filename.ts
|
|
6
6
|
const EXTENSIONS = [
|
|
@@ -1,29 +1,11 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { n as globSync, t as glob } from "./dist-
|
|
4
|
-
import { c as isIdentifier, d as isObjectExpression, l as isLiteral, s as isCallExpression } from "./entry-
|
|
5
|
-
import { c as parseWebSocketFilename, o as isRouteEnabledForEnvironment, s as parseRouteFilename, t as scanPages } from "./scan-
|
|
6
|
-
import { i as scanEmailHandlers } from "./email-
|
|
7
|
-
import {
|
|
8
|
-
import { pathToFileURL } from "node:url";
|
|
1
|
+
import { a as join, i as isAbsolute, t as basename } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-CKQ-Q5JS.mjs";
|
|
3
|
+
import { n as globSync, t as glob } from "./dist-Bn8Kodjp.mjs";
|
|
4
|
+
import { c as isIdentifier, d as isObjectExpression, l as isLiteral, s as isCallExpression } from "./entry-DdRFGK0y.mjs";
|
|
5
|
+
import { c as parseWebSocketFilename, o as isRouteEnabledForEnvironment, s as parseRouteFilename, t as scanPages } from "./scan-DJbooZm2.mjs";
|
|
6
|
+
import { i as scanEmailHandlers } from "./email-C5kaZXzJ.mjs";
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
9
8
|
import { parseSync } from "vite";
|
|
10
|
-
//#region src/auth/config.ts
|
|
11
|
-
function isVoidAuthConfigSource(code) {
|
|
12
|
-
return /\bfrom\s+["']void\/auth["']/.test(code);
|
|
13
|
-
}
|
|
14
|
-
function findVoidAuthConfig(root, paths = readProjectPaths(root)) {
|
|
15
|
-
for (const absPath of paths.authConfigCandidates) {
|
|
16
|
-
if (!existsSync(absPath)) continue;
|
|
17
|
-
if (isVoidAuthConfigSource(readFileSync(absPath, "utf-8"))) return absPath;
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
async function loadVoidAuthConfig(configPath) {
|
|
22
|
-
if (!configPath) return;
|
|
23
|
-
const mod = await import(pathToFileURL(configPath).href);
|
|
24
|
-
return mod.default ?? mod.auth ?? mod.config;
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
9
|
//#region src/crons/scan.ts
|
|
28
10
|
const JOB_EXTENSIONS = [
|
|
29
11
|
"ts",
|
|
@@ -402,4 +384,4 @@ function scanRoutePatternsSync(root, paths = readProjectPaths(root), environment
|
|
|
402
384
|
return routeFiles.filter((f) => !isWebSocketPatternFile(f)).filter((f) => !f.split("/").some((s) => s.startsWith("_"))).map((f) => parseRouteFilename(f)).filter((route) => isRouteEnabledForEnvironment(route, environment)).sort(compareRouteSpecificity);
|
|
403
385
|
}
|
|
404
386
|
//#endregion
|
|
405
|
-
export { scanQueuesSync as a,
|
|
387
|
+
export { scanQueuesSync as a, scanWebSocketRoutesSync as i, scanRoutePatternsSync as n, scanJobsSync as o, scanRoutes as r, scanMiddlewareSync as t };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as cliTitle } from "./output-urU86XeT.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-B9_D6ygs.mjs";
|
|
3
|
+
import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-CWNIPoXc.mjs";
|
|
4
|
+
import { _ as validateSecretValues } from "./env-validation-BsFEXps5.mjs";
|
|
5
|
+
import { E as confirm, F as password, N as note, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
6
|
+
import { n as PlatformClient } from "./client-PdAJ-F0t.mjs";
|
|
7
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xvis70DG.mjs";
|
|
6
8
|
import { readFileSync } from "node:fs";
|
|
7
9
|
//#region src/cli/secret.ts
|
|
8
10
|
async function runSecretCommand(root, args) {
|
|
@@ -76,7 +78,7 @@ async function runSecretCommand(root, args) {
|
|
|
76
78
|
}
|
|
77
79
|
async function runCloudflareSecretCommand(root, args) {
|
|
78
80
|
if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
79
|
-
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-
|
|
81
|
+
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-BHNJVDbN.mjs");
|
|
80
82
|
const context = resolveCloudflareOperationContext(root);
|
|
81
83
|
if (args.action === "list") {
|
|
82
84
|
const secrets = await listCloudflareSecrets(context);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/pages/serialize.ts
|
|
2
|
+
/**
|
|
3
|
+
* Escape JSON for embedding inside an inline `<script type="application/json">`
|
|
4
|
+
* tag. Replaces `<`, `>`, `&`, U+2028, U+2029 with their `\uXXXX` JSON escape
|
|
5
|
+
* sequences so the script tag cannot be closed early and the payload survives
|
|
6
|
+
* `JSON.parse` on hydration.
|
|
7
|
+
*/
|
|
8
|
+
function serializePageData(pageObj) {
|
|
9
|
+
return JSON.stringify(pageObj).replace(/[<>&\u2028\u2029]/g, (c) => {
|
|
10
|
+
return `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { serializePageData as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/pages/serialize.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Escape JSON for embedding inside an inline `<script type="application/json">`
|
|
4
|
+
* tag. Replaces `<`, `>`, `&`, U+2028, U+2029 with their `\uXXXX` JSON escape
|
|
5
|
+
* sequences so the script tag cannot be closed early and the payload survives
|
|
6
|
+
* `JSON.parse` on hydration.
|
|
7
|
+
*/
|
|
8
|
+
declare function serializePageData(pageObj: unknown): string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { serializePageData as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as join, l as relative } from "./dist-4WkAWhWx.mjs";
|
|
2
|
+
import { j as log } from "./dist-Dn6nn2IU.mjs";
|
|
3
|
+
import { n as getPackageDir } from "./agents-gni4eqBu.mjs";
|
|
3
4
|
import { existsSync, mkdirSync, readFileSync, readdirSync, readlinkSync, symlinkSync } from "node:fs";
|
|
4
5
|
//#region src/cli/skills.ts
|
|
5
6
|
function parseSkills(skillsDir) {
|