void 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-cmd-CdUll_35.mjs → account-cmd-HP8bixYo.mjs} +3 -3
- package/dist/{application-analysis-fEqoSeMp.mjs → application-analysis-DDOQwiXk.mjs} +18 -12
- package/dist/{application-routing-DAhNP4u3.mjs → application-routing-4719u_kf.mjs} +3 -1
- package/dist/auth-g2TQbDLD.d.mts +70 -0
- package/dist/{auth-link-C87vGXM-.mjs → auth-link-CedYpDCy.mjs} +3 -3
- package/dist/{auth-router-6I81r-ix.mjs → auth-router-vafo7x8w.mjs} +11 -6
- package/dist/{better-auth-shared-D-6z0q0f.mjs → better-auth-shared-7FM3Uk2N.mjs} +48 -2
- package/dist/{better-auth-shared-DVk2DkTW.d.mts → better-auth-shared-BHB8kiTE.d.mts} +1 -1
- package/dist/{build-cmd-ex1g-j_e.mjs → build-cmd-9vUAQ1_V.mjs} +1 -1
- package/dist/{cache-oHzrnY3z.mjs → cache-jvwLNb0h.mjs} +1 -1
- package/dist/{cancel-deploy-viAMD0Q_.mjs → cancel-deploy-Dw0UmWKO.mjs} +1 -1
- package/dist/{cf-build-output-BhVxldCw.mjs → cf-build-output-XpNR9zoh.mjs} +122 -5
- package/dist/cf-build-output-bd8Uwv1P.mjs +1 -0
- package/dist/{cf-worker-settings-BECvvTVd.mjs → cf-worker-settings-Dg27RzyT.mjs} +11 -5
- package/dist/cli/cli.mjs +41 -32
- package/dist/cli/cloudflare-operation-process.mjs +35 -8
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{client-BEkdj1kx.mjs → client-B3LnB_bE.mjs} +8 -1
- package/dist/client-BZb9j66F.mjs +1 -0
- package/dist/{cloudflare-auth-Byo_0_N9.mjs → cloudflare-auth-DyD_kVFr.mjs} +1 -1
- package/dist/{cloudflare-cmd-DMzCv12s.mjs → cloudflare-cmd-D-b_u3T4.mjs} +2 -2
- package/dist/{cloudflare-config-DchHxPTo.mjs → cloudflare-config-CH1AylZT.mjs} +14 -3
- package/dist/{cloudflare-connect-CCRTVg-I.mjs → cloudflare-connect-zTJh8UnN.mjs} +2 -2
- package/dist/{cloudflare-operations-Dh9dEHJj.mjs → cloudflare-operations-Bc-7fN44.mjs} +4 -4
- package/dist/{cloudflare-operations-DsSaw2BT.mjs → cloudflare-operations-BtulCNOg.mjs} +1 -1
- package/dist/{config-BU6hMu1W.mjs → config-BV2ASlpn.mjs} +1 -1
- package/dist/{config-DQfHOKh9.d.mts → config-CAdZVTLN.d.mts} +4 -1
- package/dist/config-D-6q7EBH.mjs +87 -0
- package/dist/{config-DHgSEWT7.mjs → config-OFOAimzt.mjs} +5 -3
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-BIaXIkkv.mjs → config-tqMM6DwY.mjs} +1 -1
- package/dist/{connect-k7R2rPVA.mjs → connect-BOM6zvFX.mjs} +4 -4
- package/dist/{create-project-DV71ol5d.mjs → create-project-Bxd02EHN.mjs} +1 -1
- package/dist/{create-project-DTuy-l0z.mjs → create-project-C2K0DN2O.mjs} +1 -1
- package/dist/{db-DVOkLH5X.mjs → db-Cdvr3zwG.mjs} +18 -18
- package/dist/{db-types-NGxPwnlt.mjs → db-types-0eCiqYb1.mjs} +1 -1
- package/dist/{delete-BbP5eopu.mjs → delete-lETE6Tpt.mjs} +1 -1
- package/dist/deploy-CX94CmKa.mjs +2 -0
- package/dist/{deploy-7H32EnUs.mjs → deploy-CdM-LAxX.mjs} +473 -148
- package/dist/{deploy-managed-static-DlvcvnQT.mjs → deploy-managed-static-DjeBFG2c.mjs} +43 -20
- package/dist/{deploy-transport-BzGEj0Ge.mjs → deploy-transport-DIq_gFTP.mjs} +14 -13
- package/dist/deploy.d.mts +2 -0
- package/dist/deploy.mjs +8 -5
- package/dist/{dispatch-DoUnxTNo.mjs → dispatch-CLa2LThw.mjs} +76 -7
- package/dist/{domain-CA2wBgra.mjs → domain-DyhNtdYf.mjs} +2 -2
- package/dist/{email-DXpCc77w.mjs → email-DM2wDcBN.mjs} +59 -10
- package/dist/{email-cloudflare-D03g2TkS.mjs → email-cloudflare-PMbAev9Q.mjs} +124 -10
- package/dist/{env-DgOQ9_8S.mjs → env-78hbN-oI.mjs} +3 -3
- package/dist/{env-BJjULvL0.mjs → env-BaMz0j7H.mjs} +6 -1
- package/dist/{env-validation-Dwq3PJzK.mjs → env-validation-B3VobvXm.mjs} +2 -1
- package/dist/{env-validation-BmsdCZEk.mjs → env-validation-BUfFZ6bt.mjs} +1 -1
- package/dist/error-pages-CLIJ7aYq.mjs +37 -0
- package/dist/gen-BhWBT4iu.mjs +1 -0
- package/dist/{gen-BfmcIi2g.mjs → gen-CFmsUsW1.mjs} +3 -3
- package/dist/{github-cmd-CY9LUqLh.mjs → github-cmd-De-_IWbM.mjs} +1 -1
- package/dist/{handler-BbkSPzGF.d.mts → handler-BHktmuTL.d.mts} +4 -2
- package/dist/{headers-D522zd0A.mjs → headers--vaK_chu.mjs} +1 -1
- package/dist/{help-CxSlPpzJ.mjs → help-CKbrhZha.mjs} +16 -1
- package/dist/help-qOZr3wng.mjs +1 -0
- package/dist/index.d.mts +3 -5
- package/dist/index.mjs +370 -140
- package/dist/{info-7VDlhtyy.mjs → info-Yg0-V5Rs.mjs} +4 -4
- package/dist/{init-DxYyOs4-.mjs → init-CDiJQycf.mjs} +241 -206
- package/dist/{link-Ddmod1dZ.mjs → link-Dllip08S.mjs} +2 -2
- package/dist/{list-MogaugiO.mjs → list-BYRP6am0.mjs} +2 -2
- package/dist/{live-Bt8Y_0bg.d.mts → live-BllfDuzA.d.mts} +2 -2
- package/dist/{local-d1-BHBnKWRb.mjs → local-d1-CAwAs9GH.mjs} +1 -1
- package/dist/login-BAPmYnb7.mjs +1 -0
- package/dist/{login-Cttnagmm.mjs → login-PcFy5mlC.mjs} +2 -2
- package/dist/{logs-CAszUWZI.mjs → logs-DmJTBhed.mjs} +2 -2
- package/dist/{migrate-DyT2jJ8y.mjs → migrate-B8S2xTcb.mjs} +5 -66
- package/dist/migrate-BIYTPQE6.mjs +1 -0
- package/dist/nitro.mjs +4 -4
- package/dist/{node-WB7c2N4L.mjs → node-CDOPrGSl.mjs} +5 -5
- package/dist/{operator-args-UnE8Y2eK.mjs → operator-args-BsJIYXaT.mjs} +8 -1
- package/dist/operator-cmd-CjazwOyb.mjs +1 -0
- package/dist/{operator-cmd-skshjMGl.mjs → operator-cmd-DmkmS2wL.mjs} +4 -3
- package/dist/pages/client.d.mts +32 -4
- package/dist/pages/client.mjs +186 -29
- package/dist/pages/index.d.mts +34 -2
- package/dist/pages/index.mjs +96 -55
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +9 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/platform-args-BC8_hsDj.mjs +1 -0
- package/dist/{platform-args-DVbVClZl.mjs → platform-args-BMD2gjc_.mjs} +1 -1
- package/dist/{platform-auth-config-C-pm5Qzx.mjs → platform-auth-config-CImnfohz.mjs} +3 -3
- package/dist/{platform-auth-protection-SHhvim1L.mjs → platform-auth-protection-BogLhtHi.mjs} +2 -2
- package/dist/{platform-auth-recovery-DXVWs-wA.mjs → platform-auth-recovery-B-mEaWEi.mjs} +2 -2
- package/dist/{platform-cmd-PiNRkopU.mjs → platform-cmd-CV8NxIIn.mjs} +1 -1
- package/dist/{platform-cmd-D5I1beUX.mjs → platform-cmd-DZK2ixMl.mjs} +4 -4
- package/dist/{platform-domain-jpmBfZeb.mjs → platform-domain-CRvelPGE.mjs} +2 -2
- package/dist/{platform-lifecycle-DyKmuNY6.mjs → platform-lifecycle-CPYY7E9B.mjs} +103 -41
- package/dist/{platform-lifecycle-DH3Yr1qQ.mjs → platform-lifecycle-DwXq7kZt.mjs} +1 -1
- package/dist/{platform-management--vDwSn35.mjs → platform-management-BOnGbMSM.mjs} +1 -1
- package/dist/{platform-management-7m-PLaPJ.mjs → platform-management-lXdgGgAM.mjs} +1 -1
- package/dist/{platform-recovery-BiNpZZab.mjs → platform-recovery-noaALXnE.mjs} +2 -2
- package/dist/{plugin-inference-DUjCd55H.mjs → plugin-inference-CeiB6BG5.mjs} +53 -18
- package/dist/{prepare-BcAE5Sdj.mjs → prepare-BuOS18AM.mjs} +1 -1
- package/dist/{prepare-DA-17DhO.mjs → prepare-D604Yiyr.mjs} +12 -8
- package/dist/prepare-DU-tOpS5.mjs +1 -0
- package/dist/{prerender-render-Cijv7UFo.mjs → prerender-render-CaShbHJ3.mjs} +13 -1
- package/dist/prerender-render.d.mts +1 -0
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-DA4K5faU.mjs → project-cmd-DBYqAIbe.mjs} +15 -15
- package/dist/{project-team-CQBNveX3.mjs → project-team-BjCLgTRC.mjs} +1 -1
- package/dist/{project-token-CCalFyQf.mjs → project-token-BB6PwaA9.mjs} +1 -1
- package/dist/{project-tsconfig-Itv1f4WC.mjs → project-tsconfig-CVvk6Z_e.mjs} +24 -2
- package/dist/{project-zero-trust-DPnkiEuT.mjs → project-zero-trust-CWDh1P_t.mjs} +1 -1
- package/dist/{protocol-BBDpJz3G.d.mts → protocol-D5XDySYu.d.mts} +2 -2
- package/dist/{provision-BFLCrnUp.mjs → provision-DfxLCg-d.mjs} +1 -1
- package/dist/{provision-DtROpNNI.mjs → provision-DztLJ97X.mjs} +24 -8
- package/dist/{requests-BpH0kImL.mjs → requests-D_pbzDyz.mjs} +1 -1
- package/dist/{rollback-CXS1tAa-.mjs → rollback-CjfIYsJx.mjs} +2 -2
- package/dist/{route-types-BZi26DVS.mjs → route-types-DvEGmPif.mjs} +109 -30
- package/dist/routes-stub.d.mts +22 -13
- package/dist/runtime/auth.d.mts +2 -2
- 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 +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/log.mjs +19 -1
- package/dist/runtime/routing.d.mts +5 -4
- package/dist/runtime/routing.mjs +14 -73
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +4 -2
- package/dist/{scan-8IzYXiU_.mjs → scan-N9WzdcAl.mjs} +302 -23
- package/dist/{secret-BbXHfLAt.mjs → secret-3X0PxmuX.mjs} +9 -12
- package/dist/static-asset-marker-Btf-6oCD.mjs +32 -0
- package/dist/{types-7AIz0OZu.d.mts → types-w72dljaA.d.mts} +6 -1
- package/dist/{version-metadata-tS39iW09.mjs → version-metadata-D2vfMQzv.mjs} +2 -1
- package/dist/worker-conditions-AWFRcFxR.mjs +11 -0
- package/dist/{wrangler-F96NnLyb.mjs → wrangler-I-scB_1t.mjs} +82 -13
- package/dist/wrangler-UnwdISay.mjs +1 -0
- package/dist/{wrapper-D3sZyh2C.mjs → wrapper-BBl1rC32.mjs} +8 -12
- package/dist/{ws-BH-im_tX.d.mts → ws-B3ClMVDh.d.mts} +3 -2
- package/docs/guide/auth.md +4 -2
- package/docs/guide/edge/redirects.md +22 -0
- package/docs/guide/edge/static-assets.md +10 -0
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/email/receiving.md +2 -0
- package/docs/guide/email/sending.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +43 -13
- package/docs/guide/pages-routing/markdown.md +2 -0
- package/docs/guide/pages-routing/overview.md +33 -2
- package/docs/guide/platform/administration/email.md +18 -0
- package/docs/guide/platform/installation/maintenance.md +3 -1
- package/docs/guide/platform/installation/prerequisites.md +9 -4
- package/docs/guide/platform/installation/uninstall.md +2 -0
- package/docs/guide/queues.md +13 -1
- package/docs/guide/server-routing.md +40 -2
- package/docs/guide/ssg.md +8 -0
- package/docs/guide/type-safety.md +7 -7
- package/docs/guide/websockets.md +4 -2
- package/docs/integrations/cloudflare.md +16 -7
- package/docs/reference/api/auth.md +6 -2
- package/docs/reference/api/deploy.md +9 -5
- package/docs/reference/api/pages.md +6 -4
- package/docs/reference/cli/deploy.md +10 -9
- package/docs/reference/cli/email.md +13 -0
- package/docs/reference/cli/platform-email.md +2 -2
- package/docs/reference/cli.md +1 -0
- package/docs/reference/config.md +11 -1
- package/docs/reference/structure.md +3 -1
- package/package.json +9 -7
- package/schema.json +4 -0
- package/skills/void/SKILL.md +1 -1
- package/templates/assets/icons.svg +49 -0
- package/templates/assets/react.svg +1 -0
- package/templates/assets/solid.svg +1 -0
- package/templates/assets/stack.svg +35 -0
- package/templates/assets/svelte.svg +1 -0
- package/templates/assets/void.svg +5 -0
- package/templates/assets/vue.svg +1 -0
- package/dist/auth-DkcFflXV.d.mts +0 -42
- package/dist/cf-build-output-BJHuSsVN.mjs +0 -1
- package/dist/client-BiRDZTSd.mjs +0 -1
- package/dist/config-CyUJzi3q.mjs +0 -32
- package/dist/deploy-CE0Ev0Ob.mjs +0 -2
- package/dist/gen-NrOlWZaG.mjs +0 -1
- package/dist/help-BeAFFE5C.mjs +0 -1
- package/dist/login-DgDwlKc_.mjs +0 -1
- package/dist/migrate-n49ZeS1X.mjs +0 -1
- package/dist/operator-cmd-d2MvJOrl.mjs +0 -1
- package/dist/parse-filename-DioPHiR9.mjs +0 -77
- package/dist/platform-args-kQrgxScY.mjs +0 -1
- package/dist/prepare-C4I0f--h.mjs +0 -1
- package/dist/wrangler-BLb3_luP.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-g2TQbDLD.mjs";
|
|
2
2
|
import { n as createAuthClient, t as auth } from "../auth-client-vue-bChShbQP.mjs";
|
|
3
3
|
import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
|
|
4
4
|
import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-g2TQbDLD.mjs";
|
|
2
2
|
import { n as createAuthClient, t as auth } from "../auth-client-Bawdj38n.mjs";
|
|
3
3
|
import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
|
|
4
4
|
import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-
|
|
2
|
+
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-BHktmuTL.mjs";
|
|
3
3
|
export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|
package/dist/runtime/live.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-
|
|
2
|
+
import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-BllfDuzA.mjs";
|
|
3
3
|
export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
|
package/dist/runtime/log.mjs
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
//#region src/runtime/log.ts
|
|
2
|
+
function errorReplacer() {
|
|
3
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
4
|
+
return (_key, value) => {
|
|
5
|
+
if (!(value instanceof Error)) return value;
|
|
6
|
+
if (seen.has(value)) return {
|
|
7
|
+
name: value.name,
|
|
8
|
+
message: value.message
|
|
9
|
+
};
|
|
10
|
+
seen.add(value);
|
|
11
|
+
return {
|
|
12
|
+
...value,
|
|
13
|
+
name: value.name,
|
|
14
|
+
message: value.message,
|
|
15
|
+
stack: value.stack,
|
|
16
|
+
cause: value.cause
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
2
20
|
function format(message, fields) {
|
|
3
21
|
try {
|
|
4
22
|
const payload = Object.create(null);
|
|
@@ -8,7 +26,7 @@ function format(message, fields) {
|
|
|
8
26
|
if (typeof value === "function") continue;
|
|
9
27
|
payload[key] = value;
|
|
10
28
|
}
|
|
11
|
-
return JSON.stringify(payload);
|
|
29
|
+
return JSON.stringify(payload, errorReplacer());
|
|
12
30
|
} catch {
|
|
13
31
|
return JSON.stringify({
|
|
14
32
|
msg: message,
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { A as filterInternalBindings, M as createClientAssetTags, N as createManifestLoader, O as createAssetFallback, j as ClientAssetTags, k as createWorkerFetch } from "../handler-
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet } from "../protocol-
|
|
1
|
+
import { A as filterInternalBindings, M as createClientAssetTags, N as createManifestLoader, O as createAssetFallback, j as ClientAssetTags, k as createWorkerFetch } from "../handler-BHktmuTL.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet } from "../protocol-D5XDySYu.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Context, Hono, MiddlewareHandler } from "hono";
|
|
5
5
|
//#region src/runtime/routing-errors.d.ts
|
|
6
|
+
type ErrorPageStatus = 404 | 500;
|
|
6
7
|
type ErrorRendererOptions = {
|
|
7
8
|
dev?: boolean;
|
|
8
9
|
projectRoot: string;
|
|
9
10
|
homeDir: string;
|
|
10
11
|
};
|
|
11
12
|
type ErrorRenderer = {
|
|
12
|
-
createResponse: (request: Request, status:
|
|
13
|
-
serveCustomPage: (context: Context, status:
|
|
13
|
+
createResponse: (request: Request, status: ErrorPageStatus, title: string, error?: unknown) => Response;
|
|
14
|
+
serveCustomPage: (context: Context, status: ErrorPageStatus, title: string, error?: unknown) => Promise<Response>;
|
|
14
15
|
onError: (error: Error, context: Context) => Promise<Response> | Response;
|
|
15
16
|
};
|
|
16
17
|
/** Error rendering is shared by generated Pages apps; production never includes exception details. */
|
package/dist/runtime/routing.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-DdSFxoLp.mjs";
|
|
2
|
+
import { t as renderDefaultErrorPage } from "../error-pages-CLIJ7aYq.mjs";
|
|
2
3
|
import { t as convertReturnValue } from "../response-Tn7rU0MV.mjs";
|
|
3
4
|
import { i as searchWithoutActionKey, n as hasActionKey, r as markActionKey, t as actionKeySegment } from "../action-key-XZ9HkWAO.mjs";
|
|
4
5
|
import { n as handlePageGet, r as handlePageMutation } from "../protocol-DimNxVRr.mjs";
|
|
5
6
|
import { t as VoidAssetRewriteError } from "../handler-BZ1t7-Rv.mjs";
|
|
7
|
+
import { n as markStaticAsset } from "../static-asset-marker-Btf-6oCD.mjs";
|
|
6
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
|
-
import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, substituteParams } from "@void/edge";
|
|
9
|
+
import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, redirectToHttps, substituteParams } from "@void/edge";
|
|
8
10
|
//#region src/runtime/routing-worker.ts
|
|
9
11
|
const ASSET_CONTENT_TYPES = {
|
|
10
12
|
".avif": "image/avif",
|
|
@@ -124,6 +126,10 @@ function createWorkerFetch(options) {
|
|
|
124
126
|
const internal = await options.internalRoute(request, env, ctx);
|
|
125
127
|
if (internal) return internal;
|
|
126
128
|
if (discovery) return Response.json({ paths: await options.collectPrerenderPaths(request, env, ctx) });
|
|
129
|
+
if (options.alwaysUseHttps) {
|
|
130
|
+
const redirect = redirectToHttps(request);
|
|
131
|
+
if (redirect) return redirect;
|
|
132
|
+
}
|
|
127
133
|
const userEnv = options.filterBindings(env);
|
|
128
134
|
const render = async (req) => options.assets(req, env, await options.app.fetch(req, userEnv, ctx));
|
|
129
135
|
if (options.isr && env.ISR_CACHE && request.headers.get("upgrade")?.toLowerCase() !== "websocket") {
|
|
@@ -189,7 +195,7 @@ function createPagesFallback(options) {
|
|
|
189
195
|
if (path === "/api" || path.startsWith("/api/") || c.req.method !== "GET" && c.req.method !== "HEAD") return c.text("Not Found", 404);
|
|
190
196
|
const assets = c.env?.ASSETS;
|
|
191
197
|
const assetResponse = assets && typeof assets.fetch === "function" ? await assets.fetch(c.req.raw) : options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
|
|
192
|
-
if (assetResponse.status !== 404) return cachePolicy(c.req.raw, c.env, assetResponse);
|
|
198
|
+
if (assetResponse.status !== 404) return markStaticAsset(c, await cachePolicy(c.req.raw, c.env, assetResponse));
|
|
193
199
|
const fallback = options.fallbackRules ? await options.routing.applyFallback(c, options.fallbackRules) : void 0;
|
|
194
200
|
if (fallback) return fallback;
|
|
195
201
|
if (path.includes("/.") || path.substring(path.lastIndexOf("/") + 1).includes(".")) return options.errors.serveCustomPage(c, 404, "Not Found");
|
|
@@ -207,7 +213,7 @@ function createSsrFallback(options) {
|
|
|
207
213
|
const binding = c.env?.ASSETS;
|
|
208
214
|
if (!binding || typeof binding.fetch !== "function") return options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
|
|
209
215
|
const response = await binding.fetch(c.req.raw);
|
|
210
|
-
return response.status === 404 ? options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 })) : cachePolicy(c.req.raw, c.env, response);
|
|
216
|
+
return response.status === 404 ? options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 })) : markStaticAsset(c, await cachePolicy(c.req.raw, c.env, response));
|
|
211
217
|
};
|
|
212
218
|
return async (c) => {
|
|
213
219
|
if (options.nodeTarget && options.fallbackRules) {
|
|
@@ -237,7 +243,7 @@ function createAssetNotFound(options) {
|
|
|
237
243
|
const assets = c.env?.ASSETS;
|
|
238
244
|
if (assets && typeof assets.fetch === "function") {
|
|
239
245
|
const response = await assets.fetch(c.req.raw);
|
|
240
|
-
if (response.status !== 404) return cachePolicy(c.req.raw, c.env, response);
|
|
246
|
+
if (response.status !== 404) return markStaticAsset(c, await cachePolicy(c.req.raw, c.env, response));
|
|
241
247
|
}
|
|
242
248
|
}
|
|
243
249
|
return (options.fallbackRules ? await options.routing.applyFallback(c, options.fallbackRules) : void 0) ?? options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
|
|
@@ -680,7 +686,7 @@ function createErrorRenderer(options) {
|
|
|
680
686
|
<aside class="__void-error-overlay" data-void-error-overlay role="dialog" aria-label="Void dev error overlay"><div class="__void-error-backdrop" data-void-error-backdrop></div><section class="__void-error-panel"><button type="button" class="__void-error-close" data-void-error-close aria-label="Minimize error overlay"><svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M3.757 3.757 12.243 12.243M12.243 3.757 3.757 12.243" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round"/></svg></button><header class="__void-error-header"><p class="__void-error-status">${escapeHtml(String(status) + ": " + title)}</p></header>${sections}</section><button type="button" class="__void-error-minimized" data-void-error-toggle aria-label="Show dev error overlay" aria-expanded="true">${escapeHtml(errorCountLabel)}</button><script>(function(){const script=document.currentScript;if(!(script instanceof HTMLScriptElement))return;const root=script.closest("[data-void-error-overlay]");if(!(root instanceof HTMLElement))return;const backdrop=root.querySelector("[data-void-error-backdrop]");const closeButton=root.querySelector("[data-void-error-close]");const toggle=root.querySelector("[data-void-error-toggle]");const setMinimized=(minimized)=>{root.classList.toggle("is-minimized", minimized);if(toggle instanceof HTMLElement)toggle.setAttribute("aria-expanded", minimized ? "false" : "true");};if(backdrop instanceof HTMLElement)backdrop.addEventListener("click",()=>setMinimized(true));if(closeButton instanceof HTMLElement)closeButton.addEventListener("click",()=>setMinimized(true));if(toggle instanceof HTMLElement)toggle.addEventListener("click",()=>setMinimized(false));})();<\/script></aside>`;
|
|
681
687
|
}
|
|
682
688
|
function injectDevErrorOverlay(html, overlay) {
|
|
683
|
-
return /<\/body\s*>/i.test(html) ? html.replace(/<\/body\s*>/i, overlay + "</body>") : html + overlay;
|
|
689
|
+
return /<\/body\s*>/i.test(html) ? html.replace(/<\/body\s*>/i, () => overlay + "</body>") : html + overlay;
|
|
684
690
|
}
|
|
685
691
|
function getErrorAssetCss(error) {
|
|
686
692
|
const tags = error && (typeof error === "object" || typeof error === "function") && "__voidPageAssetTags" in error ? error.__voidPageAssetTags : null;
|
|
@@ -688,76 +694,11 @@ function createErrorRenderer(options) {
|
|
|
688
694
|
}
|
|
689
695
|
function injectErrorAssetCss(html, css) {
|
|
690
696
|
if (!css) return html;
|
|
691
|
-
return /<\/head\s*>/i.test(html) ? html.replace(/<\/head\s*>/i, css + "</head>") : css + html;
|
|
697
|
+
return /<\/head\s*>/i.test(html) ? html.replace(/<\/head\s*>/i, () => css + "</head>") : css + html;
|
|
692
698
|
}
|
|
693
699
|
function renderErrorPage(status, title, error) {
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
const overlay = dev && status === 500 && error ? renderDevErrorOverlay(status, title, error) : "";
|
|
697
|
-
return `<!doctype html>
|
|
698
|
-
<html lang="en">
|
|
699
|
-
<head>
|
|
700
|
-
<meta charset="utf-8">
|
|
701
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
702
|
-
<title>${escapeHtml(heading)}</title>
|
|
703
|
-
${getErrorAssetCss(error)}
|
|
704
|
-
<style>
|
|
705
|
-
:root {
|
|
706
|
-
color-scheme: light dark;
|
|
707
|
-
font-family: ${ERROR_PAGE_FONT_STACK};
|
|
708
|
-
background: #f5f5f5;
|
|
709
|
-
color: #171717;
|
|
710
|
-
}
|
|
711
|
-
* { box-sizing: border-box; }
|
|
712
|
-
body {
|
|
713
|
-
margin: 0;
|
|
714
|
-
min-block-size: 100dvh;
|
|
715
|
-
display: grid;
|
|
716
|
-
place-items: center;
|
|
717
|
-
padding: 24px;
|
|
718
|
-
background: radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(245, 245, 245, 0.96) 52%), linear-gradient(180deg, #fafafa 0%, #f1f1f1 100%);
|
|
719
|
-
font: 500 16px/1.5 ${ERROR_PAGE_FONT_STACK};
|
|
720
|
-
}
|
|
721
|
-
main {
|
|
722
|
-
inline-size: min(100%, 560px);
|
|
723
|
-
padding: 32px 36px;
|
|
724
|
-
border: 1px solid #d4d4d8;
|
|
725
|
-
border-radius: 32px;
|
|
726
|
-
corner-shape: squircle;
|
|
727
|
-
background: rgba(255, 255, 255, 0.88);
|
|
728
|
-
text-align: center;
|
|
729
|
-
backdrop-filter: blur(12px);
|
|
730
|
-
}
|
|
731
|
-
h1 {
|
|
732
|
-
margin: 0;
|
|
733
|
-
font: 400 clamp(1.5rem, 1.2rem + 1vw, 2rem) / 1.1 ${ERROR_PAGE_FONT_STACK};
|
|
734
|
-
letter-spacing: -0.03em;
|
|
735
|
-
}
|
|
736
|
-
strong {
|
|
737
|
-
font-weight: 600;
|
|
738
|
-
}
|
|
739
|
-
@media (prefers-color-scheme: dark) {
|
|
740
|
-
:root {
|
|
741
|
-
background: #0a0a0a;
|
|
742
|
-
color: #f5f5f5;
|
|
743
|
-
}
|
|
744
|
-
body {
|
|
745
|
-
background: radial-gradient(circle at top, rgba(38, 38, 38, 0.96), rgba(10, 10, 10, 0.96) 52%), linear-gradient(180deg, #171717 0%, #0a0a0a 100%);
|
|
746
|
-
}
|
|
747
|
-
main {
|
|
748
|
-
border-color: #27272a;
|
|
749
|
-
background: rgba(23, 23, 23, 0.88);
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
</style>
|
|
753
|
-
</head>
|
|
754
|
-
<body>
|
|
755
|
-
<main>
|
|
756
|
-
<h1><strong>${escapeHtml(prefix)}</strong>${escapeHtml(title)}</h1>
|
|
757
|
-
</main>
|
|
758
|
-
${overlay}
|
|
759
|
-
</body>
|
|
760
|
-
</html>`;
|
|
700
|
+
const html = injectErrorAssetCss(renderDefaultErrorPage(status), getErrorAssetCss(error));
|
|
701
|
+
return dev && status === 500 && error ? injectDevErrorOverlay(html, renderDevErrorOverlay(status, title, error)) : html;
|
|
761
702
|
}
|
|
762
703
|
function createErrorResponse(request, status, title, error) {
|
|
763
704
|
if (!shouldServeHtmlErrorPage(request)) return new Response(title, { status });
|
|
@@ -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-BHktmuTL.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState } from "../auth-
|
|
2
|
-
import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-
|
|
3
|
-
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-
|
|
1
|
+
import { n as AuthState } from "../auth-g2TQbDLD.mjs";
|
|
2
|
+
import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-BHB8kiTE.mjs";
|
|
3
|
+
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-B3ClMVDh.mjs";
|
|
4
4
|
//#region src/runtime/ws-server.d.ts
|
|
5
5
|
export type WebSocketRouteMeta = {
|
|
6
6
|
name?: string;
|
package/dist/runtime/ws.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-
|
|
1
|
+
import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-B3ClMVDh.mjs";
|
|
2
2
|
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
|
package/dist/runtime/ws.mjs
CHANGED
|
@@ -31,6 +31,7 @@ var VoidSocket = class {
|
|
|
31
31
|
buffer = [];
|
|
32
32
|
reconnectAttempts = 0;
|
|
33
33
|
closedByUser = false;
|
|
34
|
+
reconnectTimer;
|
|
34
35
|
constructor(url, options) {
|
|
35
36
|
this.url = url;
|
|
36
37
|
this.options = options;
|
|
@@ -69,7 +70,7 @@ var VoidSocket = class {
|
|
|
69
70
|
if (this.options.maxReconnectAttempts != null && this.reconnectAttempts >= this.options.maxReconnectAttempts) return;
|
|
70
71
|
this.reconnectAttempts += 1;
|
|
71
72
|
const delay = this.options.reconnectDelayMs ?? 1e3;
|
|
72
|
-
setTimeout(() => this.connect(), delay);
|
|
73
|
+
this.reconnectTimer = setTimeout(() => this.connect(), delay);
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
send(event) {
|
|
@@ -81,6 +82,7 @@ var VoidSocket = class {
|
|
|
81
82
|
}
|
|
82
83
|
close(code, reason) {
|
|
83
84
|
this.closedByUser = true;
|
|
85
|
+
clearTimeout(this.reconnectTimer);
|
|
84
86
|
this.socket?.close(code, reason);
|
|
85
87
|
}
|
|
86
88
|
on(type, handler) {
|
|
@@ -100,7 +102,7 @@ function connect(path, options = {}) {
|
|
|
100
102
|
const base = resolveBaseUrl(options.baseURL);
|
|
101
103
|
const resolvedPath = interpolateRouteParams(path, options.params);
|
|
102
104
|
const url = new URL(resolvedPath, base);
|
|
103
|
-
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
|
|
105
|
+
url.protocol = url.protocol === "https:" || url.protocol === "wss:" ? "wss:" : "ws:";
|
|
104
106
|
return new VoidSocket(url.toString(), options);
|
|
105
107
|
}
|
|
106
108
|
//#endregion
|