void 1.8.0 → 1.9.1
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-CZKntRH2.mjs → account-cmd-BEMOdwtl.mjs} +3 -3
- package/dist/{application-analysis-CyTagJQM.mjs → application-analysis-3VVsflWZ.mjs} +5 -5
- package/dist/{application-routing-BLrMVpqi.mjs → application-routing-CJRlXCc2.mjs} +1 -1
- package/dist/{auth-Bk9VGtQW.d.mts → auth-CV9kXHKe.d.mts} +3 -1
- package/dist/{auth-DyWp-fSo.mjs → auth-aMuFOZeI.mjs} +8 -2
- package/dist/{auth-link-BOaQWMKw.mjs → auth-link-B1IynRW5.mjs} +3 -3
- package/dist/{auth-router-D0-VcmDs.mjs → auth-router-DVaWJdRB.mjs} +2 -2
- package/dist/{better-auth-shared-CdVyCUou.mjs → better-auth-shared-C7LHvF4L.mjs} +1 -1
- package/dist/{better-auth-shared-CQFdtguU.d.mts → better-auth-shared-ajs3LNrY.d.mts} +1 -1
- package/dist/{build-cmd-JTsXXf2F.mjs → build-cmd-Dq8tdqQG.mjs} +1 -1
- package/dist/{cache-D0m3Z_Xf.mjs → cache-DGMnskX7.mjs} +1 -1
- package/dist/{cancel-deploy-Ce6Os4fa.mjs → cancel-deploy-96S5hD1E.mjs} +1 -1
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{cli-main-rkrJy2Ge.mjs → cli-main-CQRLxZAu.mjs} +28 -28
- package/dist/client-66c0RLDM.mjs +1 -0
- package/dist/{client-SZPyj4X_.mjs → client-D6w5x7hM.mjs} +7 -7
- package/dist/{cloudflare-auth-7jTqy9Bx.mjs → cloudflare-auth-pNvmT6kL.mjs} +1 -1
- package/dist/{cloudflare-cmd-ChPLQcTP.mjs → cloudflare-cmd-BuuHUM4z.mjs} +3 -3
- package/dist/{cloudflare-config-DtOGAbeB.mjs → cloudflare-config-PxbinLLE.mjs} +2 -2
- package/dist/{cloudflare-connect-Co93VYTo.mjs → cloudflare-connect-D1QOosLd.mjs} +2 -2
- package/dist/{cloudflare-operations-CXaDKYj2.mjs → cloudflare-operations-G5AObYzF.mjs} +5 -5
- package/dist/{cloudflare-operations-DATekLwI.mjs → cloudflare-operations-I4t3mt4R.mjs} +1 -1
- package/dist/{cloudflare-process-DmTxZR-N.mjs → cloudflare-process-wcnaQ5JG.mjs} +2 -2
- package/dist/{config-wo2EaH0X.mjs → config-C1DPf8EK.mjs} +1 -1
- package/dist/{config-CTlUaXWZ.d.mts → config-CCWVY7DY.d.mts} +1 -1
- package/dist/{config-5oSQhZNj.mjs → config-CzFdJYNA.mjs} +1 -1
- package/dist/{config-DcqUBGCb.mjs → config-DlWQ_hIJ.mjs} +3 -3
- package/dist/{config-eeDzKBS9.mjs → config-Do7gJI3T.mjs} +2 -2
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-DlvXt1JR.mjs → connect-4uImOwut.mjs} +4 -4
- package/dist/{create-project-CC_7hmYJ.mjs → create-project-BaUzZnLZ.mjs} +1 -1
- package/dist/{create-project-DzY05xqC.mjs → create-project-CQMyzTvK.mjs} +1 -1
- package/dist/{db-FhyYGcJJ.mjs → db-DEpDeDsi.mjs} +19 -19
- package/dist/{db-types-sVwEpyPR.mjs → db-types-BpPYAx0B.mjs} +1 -1
- package/dist/{delete-CModjyOC.mjs → delete-BVD2kI82.mjs} +1 -1
- package/dist/deploy-Dr_Qamzw.mjs +2 -0
- package/dist/{deploy-Cz9TEzZy.mjs → deploy-Dyeo5soA.mjs} +24 -75
- package/dist/{deploy-managed-static-DlxxXkAM.mjs → deploy-managed-static-Kn73R83A.mjs} +20 -20
- package/dist/{deploy-transport-DUvm6-CR.mjs → deploy-transport-BpKBs_KR.mjs} +2 -2
- package/dist/deploy.mjs +6 -6
- package/dist/discover-Diq0l6TZ.mjs +1 -0
- package/dist/{discover-CVFCWU7W.mjs → discover-Vd18lHsj.mjs} +1 -1
- package/dist/{dispatch-CCiaAnSK.mjs → dispatch-BBfb519j.mjs} +5 -5
- package/dist/{domain-DvdZPA50.mjs → domain-BTIdyUVk.mjs} +2 -2
- package/dist/{email-ASpNrfLd.mjs → email-DvrS-I0U.mjs} +7 -7
- package/dist/{email-cloudflare-kqoN9jst.mjs → email-cloudflare-DAGpgzY1.mjs} +3 -3
- package/dist/{entry-BweGTCgj.mjs → entry-DMgR7XOf.mjs} +1 -1
- package/dist/{env-Bpkg3G5i.mjs → env-D7vORwpn.mjs} +4 -4
- package/dist/{env-types-Dz9qkiOn.mjs → env-types-WEZw5D-r.mjs} +1 -1
- package/dist/{env-validation-CN386Utu.mjs → env-validation-DKDcpxbt.mjs} +1 -1
- package/dist/{env-validation-BpCCQE_6.mjs → env-validation-DeYNRp1d.mjs} +3 -3
- package/dist/{gen-upKJChvd.mjs → gen-DimkGNve.mjs} +4 -4
- package/dist/gen-DmEeVEs4.mjs +1 -0
- package/dist/{github-cmd-BvMOlb8Z.mjs → github-cmd-D-zs6VQr.mjs} +1 -1
- package/dist/{handler-BO7Od-z9.d.mts → handler-6fzr_ikp.d.mts} +3 -3
- package/dist/{head-5XPcnG-j.mjs → head-0o0QoREY.mjs} +63 -4
- package/dist/{head-MeF_5M_3.d.mts → head-CVO92KEx.d.mts} +14 -3
- package/dist/{headers-COGEDoMN.mjs → headers-Q0kZDpk8.mjs} +1 -1
- package/dist/{help-TPCjTu6e.mjs → help-Cgdcd-SG.mjs} +4 -4
- package/dist/help-Cp3K5m1w.mjs +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +29 -24
- package/dist/{info-EsDyihwf.mjs → info-BbxQ34kk.mjs} +4 -4
- package/dist/{init-a4lVagrb.mjs → init-zyRj3QRw.mjs} +14 -14
- package/dist/{link-CE55DDzS.mjs → link-DAFXuIER.mjs} +2 -2
- package/dist/{list-CxRthQks.mjs → list-BTIcC3W9.mjs} +2 -2
- package/dist/{live-Kc55iuOQ.d.mts → live-DBybyDt0.d.mts} +2 -2
- package/dist/{live-CYJ4KGoR.mjs → live-Dw7NF1t2.mjs} +1 -1
- package/dist/load-user-env-ztmIyiLx.mjs +34 -0
- package/dist/{local-d1-CFcH9Bx3.mjs → local-d1-BnVb7Fem.mjs} +1 -1
- package/dist/login-DBs8JuSl.mjs +1 -0
- package/dist/{login-AfcSGSmE.mjs → login-DOE-MkeK.mjs} +2 -2
- package/dist/{logs-BgRJuvb1.mjs → logs-CUsjihc3.mjs} +2 -2
- package/dist/migrate-BYhoIK9R.mjs +1 -0
- package/dist/{migrate-BNAh6m_C.mjs → migrate-DtoKdGas.mjs} +4 -4
- package/dist/nitro.mjs +3 -3
- package/dist/{node-CXFUw0Uz.mjs → node-D9dPyUr0.mjs} +2 -2
- package/dist/operator-ai-logging-DFTEp81Z.mjs +121 -0
- package/dist/{operator-args-DGTuCdSE.mjs → operator-args-BCCohcz3.mjs} +3 -2
- package/dist/{operator-cmd-C-viB7Si.mjs → operator-cmd-CQOQrUiO.mjs} +26 -6
- package/dist/operator-cmd-xCACDtT1.mjs +1 -0
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +15 -13
- package/dist/pages/head.d.mts +2 -2
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +5 -1
- package/dist/pages/islands-plugin.mjs +6 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/platform-args-DSi4_M8n.mjs +1 -0
- package/dist/{platform-args-CiYeZmc5.mjs → platform-args-DtpHS_75.mjs} +1 -1
- package/dist/{platform-auth-config-Dt2qEc2w.mjs → platform-auth-config-fLwIS5VG.mjs} +3 -3
- package/dist/{platform-auth-protection-B7TaF-PZ.mjs → platform-auth-protection-BTRI_YwD.mjs} +2 -2
- package/dist/{platform-auth-recovery-suXSteJ6.mjs → platform-auth-recovery-DPK2Mvmo.mjs} +2 -2
- package/dist/{platform-cmd-DuAsIxbU.mjs → platform-cmd-BLy5uCa-.mjs} +1 -1
- package/dist/{platform-cmd-9rvYBBtr.mjs → platform-cmd-HS_FSthn.mjs} +5 -5
- package/dist/{platform-domain-DhH_vDr6.mjs → platform-domain-CHpcq_qg.mjs} +2 -2
- package/dist/{platform-lifecycle-3uI-E2bF.mjs → platform-lifecycle-B6LUBwjS.mjs} +1 -1
- package/dist/{platform-lifecycle-CXmXe2xt.mjs → platform-lifecycle-D2RS7DE0.mjs} +236 -26
- package/dist/{platform-management-PdrgDQTe.mjs → platform-management-C-T0ch4y.mjs} +1 -1
- package/dist/{platform-management-BBCHfwji.mjs → platform-management-d3ETv3Dw.mjs} +14 -14
- package/dist/{platform-plans-config-BGwkXYDM.mjs → platform-plans-config-B7yJQKf7.mjs} +114 -30
- package/dist/{platform-recovery-C8NxXGRR.mjs → platform-recovery-DS5CAsly.mjs} +2 -2
- package/dist/{plugin-inference-CErfTgEx.mjs → plugin-inference-DZHmVe1f.mjs} +3 -3
- package/dist/{prepare-BDKWZgfL.mjs → prepare-AVM4Hj3T.mjs} +8 -8
- package/dist/prepare-BSXKz6m8.mjs +1 -0
- package/dist/{prepare-BLrzXjIl.mjs → prepare-DMk8NAO-.mjs} +1 -1
- package/dist/{project-cmd-DzGvxXKH.mjs → project-cmd-TQKAOTMV.mjs} +15 -15
- package/dist/{project-paths-G0yut6Zz.mjs → project-paths-CUhCPMpK.mjs} +33 -2
- package/dist/{project-team-C5XtHbZk.mjs → project-team-B1OKeb-T.mjs} +1 -1
- package/dist/{project-token-B4D5yhHQ.mjs → project-token-RW_wpmN-.mjs} +1 -1
- package/dist/{project-tsconfig-nhnTWO_Y.mjs → project-tsconfig-MyRJgufB.mjs} +1 -1
- package/dist/{project-zero-trust--0LvktDg.mjs → project-zero-trust-TNc66p0_.mjs} +1 -1
- package/dist/{protocol-Cg2I81NA.d.mts → protocol-YS3tbxWE.d.mts} +2 -2
- package/dist/{protocol-B1Tvc9-x.mjs → protocol-a3ZUQq5W.mjs} +56 -20
- package/dist/{provision-CAcrauvr.mjs → provision-BLdkpFT4.mjs} +1 -1
- package/dist/{provision-C3yiHdld.mjs → provision-bgQTi5QZ.mjs} +2 -2
- package/dist/redirect-Dqb4fEc5.mjs +80 -0
- package/dist/{requests-CrRiTgQA.mjs → requests-Cj15-yrI.mjs} +1 -1
- package/dist/{rollback-BsmQyj-Q.mjs → rollback-CYnkng7B.mjs} +2 -2
- package/dist/{route-types-CgtlFCDz.mjs → route-types-C6eAOmOj.mjs} +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/auth.mjs +1 -1
- 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-server.mjs +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/routing.d.mts +2 -2
- package/dist/runtime/routing.mjs +6 -5
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-BJ3bj6aP.mjs → scan-4YOxDaw2.mjs} +2 -2
- package/dist/{secret-D0g5oBsP.mjs → secret-BSf7dgg_.mjs} +3 -3
- package/dist/{action-key-ByZ6DDld.mjs → url-DaehRGKR.mjs} +43 -1
- package/dist/{version-metadata-eUd6Ar_U.mjs → version-metadata-CeftH0fQ.mjs} +1 -1
- package/dist/{wrangler-k40T7XTQ.mjs → wrangler-B1gkT_wC.mjs} +3 -3
- package/dist/wrangler-fNGvPTlO.mjs +1 -0
- package/dist/{wrapper-CVMZarxf.mjs → wrapper-xJ4LP5A7.mjs} +3 -3
- package/dist/{ws--U7QicYy.d.mts → ws-C2zy0QBf.d.mts} +2 -2
- package/docs/guide/ai.md +1 -1
- package/docs/guide/app-types.md +1 -1
- package/docs/guide/auth.md +24 -27
- package/docs/guide/database/d1.md +4 -2
- package/docs/guide/database.md +29 -27
- package/docs/guide/deployment.md +2 -2
- package/docs/guide/edge/headers.md +3 -3
- package/docs/guide/edge/prerendering.md +5 -5
- package/docs/guide/edge/redirects.md +1 -1
- package/docs/guide/edge/revalidation.md +4 -2
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +4 -0
- package/docs/guide/email/sending.md +4 -2
- package/docs/guide/live.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +25 -7
- package/docs/guide/pages-routing/errors.md +17 -9
- package/docs/guide/pages-routing/head.md +44 -1
- package/docs/guide/pages-routing/islands.md +3 -1
- package/docs/guide/pages-routing/layouts.md +2 -2
- package/docs/guide/pages-routing/loaders.md +3 -1
- package/docs/guide/pages-routing/markdown.md +5 -3
- package/docs/guide/pages-routing/overview.md +14 -21
- package/docs/guide/platform/administration/connected-apps.md +10 -3
- package/docs/guide/platform/administration/email.md +1 -1
- package/docs/guide/platform/administration/plans.md +34 -1
- package/docs/guide/platform/administration/projects.md +6 -2
- package/docs/guide/platform/installation/credentials.md +12 -10
- package/docs/guide/platform/installation/maintenance.md +7 -1
- package/docs/guide/platform/installation/setup.md +8 -7
- package/docs/guide/queues.md +1 -1
- package/docs/guide/server-routing.md +2 -2
- package/docs/guide/sse.md +1 -1
- package/docs/guide/ssg.md +17 -6
- package/docs/guide/storage.md +1 -1
- package/docs/guide/testing.md +9 -7
- package/docs/guide/type-safety.md +23 -21
- package/docs/integrations/cloudflare.md +6 -2
- package/docs/integrations/frameworks/nuxt.md +1 -1
- package/docs/integrations/hono.md +21 -0
- package/docs/integrations/nodejs-bun-deno.md +4 -4
- package/docs/reference/api/auth.md +22 -4
- package/docs/reference/api/database.md +2 -2
- package/docs/reference/api/pages.md +17 -13
- package/docs/reference/api/resources.md +1 -1
- package/docs/reference/api/rewrites.md +8 -4
- package/docs/reference/api.md +1 -1
- package/docs/reference/cli/deploy.md +4 -2
- package/docs/reference/cli/platform-config.md +3 -3
- package/docs/reference/cli/platform-users.md +58 -11
- package/docs/reference/cli.md +1 -1
- package/docs/reference/config.md +7 -3
- package/package.json +7 -7
- package/skills/void/SKILL.md +1 -1
- package/dist/client-D1Vz1Zep.mjs +0 -1
- package/dist/deploy-DMieisRu.mjs +0 -2
- package/dist/discover-1DJD4YXD.mjs +0 -1
- package/dist/gen-M5fNQKfH.mjs +0 -1
- package/dist/help-CItQVDL4.mjs +0 -1
- package/dist/load-user-env-CSwdofj0.mjs +0 -48
- package/dist/login-ZHsAm-I6.mjs +0 -1
- package/dist/migrate-BflbbZQK.mjs +0 -1
- package/dist/operator-cmd-D6qNuJ_z.mjs +0 -1
- package/dist/platform-args-DJvF1-kl.mjs +0 -1
- package/dist/prepare-a1_5usAn.mjs +0 -1
- package/dist/url-CuoEn0o3.mjs +0 -43
- package/dist/wrangler-R3kMdJfw.mjs +0 -1
|
@@ -1,22 +1,44 @@
|
|
|
1
1
|
import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-uAAjlsiW.mjs";
|
|
2
2
|
import { n as isConvertedResponse } from "./response-HmNjB30w.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { a as hasActionKey, c as searchWithoutActionKey, t as decodePagePath } from "./url-DaehRGKR.mjs";
|
|
4
|
+
import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-0o0QoREY.mjs";
|
|
5
5
|
import { a as serializePageData, o as escapeScriptJson } from "./serialize-Pf-CIQK_.mjs";
|
|
6
6
|
import { PAGES_PROTOCOL_VERSION } from "@void/edge";
|
|
7
7
|
// src/pages/not-found-context.ts
|
|
8
|
+
const loaderNotFound = /* @__PURE__ */ new WeakSet();
|
|
8
9
|
const loaderBoundaries = /* @__PURE__ */ new WeakSet();
|
|
10
|
+
/** The loader already answered this URL with `c.notFound()`, so assets must not. */
|
|
9
11
|
function handlesPageLoaderNotFound(c) {
|
|
12
|
+
return loaderNotFound.has(c);
|
|
13
|
+
}
|
|
14
|
+
/** The active loader's not-found boundary renders instead of the fallback. */
|
|
15
|
+
function ownsLoaderNotFoundBoundary(c) {
|
|
10
16
|
return loaderBoundaries.has(c);
|
|
11
17
|
}
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Record a loader's `c.notFound()` for the rest of the request.
|
|
20
|
+
*
|
|
21
|
+
* Hono resolves `c.notFound()` inside the loader call, so the marker has to be
|
|
22
|
+
* set before the fallback runs. It also has to outlive the loader: the loader
|
|
23
|
+
* returns the fallback's response, which must never be read as page props.
|
|
24
|
+
* Boundary ownership ends with the loader so outer middleware can render the
|
|
25
|
+
* root not-found page after `await next()`.
|
|
26
|
+
*/
|
|
27
|
+
async function withLoaderNotFoundDecision(c, ownBoundary, load) {
|
|
28
|
+
const notFound = c.notFound;
|
|
29
|
+
const alreadyOwned = loaderBoundaries.has(c);
|
|
30
|
+
c.notFound = () => {
|
|
31
|
+
if (!loaderNotFound.has(c)) {
|
|
32
|
+
loaderNotFound.add(c);
|
|
33
|
+
if (ownBoundary) loaderBoundaries.add(c);
|
|
34
|
+
}
|
|
35
|
+
return notFound.call(c);
|
|
36
|
+
};
|
|
16
37
|
try {
|
|
17
38
|
return await load();
|
|
18
39
|
} finally {
|
|
19
|
-
|
|
40
|
+
c.notFound = notFound;
|
|
41
|
+
if (!alreadyOwned) loaderBoundaries.delete(c);
|
|
20
42
|
}
|
|
21
43
|
}
|
|
22
44
|
// src/pages/protocol.ts
|
|
@@ -158,8 +180,16 @@ function pageJsonResponse(c, pageObj) {
|
|
|
158
180
|
...POWERED_BY
|
|
159
181
|
}) });
|
|
160
182
|
}
|
|
161
|
-
|
|
162
|
-
|
|
183
|
+
/**
|
|
184
|
+
* The URL in the address bar, which a rewrite keeps while it serves another
|
|
185
|
+
* route. The path is decoded like c.req.path.
|
|
186
|
+
*/
|
|
187
|
+
function requestPathWithSearch(c, withoutActionKey = false) {
|
|
188
|
+
const original = c.originalUrl?.();
|
|
189
|
+
const requestSearch = new URL(c.req.url).search;
|
|
190
|
+
if (!original) return c.req.path + (withoutActionKey ? searchWithoutActionKey(requestSearch) : requestSearch);
|
|
191
|
+
const search = withoutActionKey && original.search === requestSearch ? searchWithoutActionKey(original.search) : original.search;
|
|
192
|
+
return decodePagePath(original.pathname) + search;
|
|
163
193
|
}
|
|
164
194
|
function requestParams(c) {
|
|
165
195
|
return c.req.param();
|
|
@@ -182,12 +212,12 @@ async function extractProps(result) {
|
|
|
182
212
|
* 200s (file downloads, streams). JSON 200s are still extracted as props for
|
|
183
213
|
* backward compat with loaders using c.json().
|
|
184
214
|
*/
|
|
185
|
-
async function runLoader(handler, c, render, recover,
|
|
215
|
+
async function runLoader(handler, c, render, recover, ownsNotFoundBoundary = false) {
|
|
186
216
|
if (!handler) return render({});
|
|
187
217
|
return runPageHandler(handler, c, async (leaf) => {
|
|
188
218
|
let result;
|
|
189
219
|
try {
|
|
190
|
-
result =
|
|
220
|
+
result = await withLoaderNotFoundDecision(c, ownsNotFoundBoundary, () => leaf(c));
|
|
191
221
|
} catch (error) {
|
|
192
222
|
const recovered = await recover?.(error);
|
|
193
223
|
if (recovered) return recovered;
|
|
@@ -226,9 +256,10 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
|
|
|
226
256
|
if (!notFound && options?.dev && error instanceof Error) message = error.message;
|
|
227
257
|
if (error && !notFound) console.error(error);
|
|
228
258
|
const shared = c.get("shared") ?? {};
|
|
259
|
+
const middlewareHead = c.get("headDefaults");
|
|
229
260
|
let head;
|
|
230
261
|
try {
|
|
231
|
-
head =
|
|
262
|
+
head = resolveRequestHead(c, configHead, middlewareHead, void 0);
|
|
232
263
|
serializePageData({
|
|
233
264
|
shared,
|
|
234
265
|
head
|
|
@@ -252,7 +283,7 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
|
|
|
252
283
|
errors: null,
|
|
253
284
|
head: {
|
|
254
285
|
...head,
|
|
255
|
-
title: head?.title ?? (status === 404 ? "Not Found" : "Internal Server Error")
|
|
286
|
+
title: head?.title ?? resolveHead(configHead, middlewareHead, { title: status === 404 ? "Not Found" : "Internal Server Error" })?.title
|
|
256
287
|
}
|
|
257
288
|
};
|
|
258
289
|
try {
|
|
@@ -370,6 +401,14 @@ function asCloudContext(c) {
|
|
|
370
401
|
async function handlePageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
371
402
|
return runPageGet(handler, headFn, asCloudContext(c), componentId, renderFn, getAssetTags, configHead, options);
|
|
372
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* Resolve the head for this request and make the crawler-only tags absolute.
|
|
406
|
+
* A prerender renders on a placeholder origin, so it keeps relative values.
|
|
407
|
+
*/
|
|
408
|
+
function resolveRequestHead(c, configHead, middlewareHead, pageHead) {
|
|
409
|
+
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
410
|
+
return absolutizeHead(head, c.env?.__VOID_PRERENDER === "1" ? void 0 : c.originalUrl?.()?.href ?? c.req.url);
|
|
411
|
+
}
|
|
373
412
|
async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
374
413
|
const renderMode = options?.renderMode ?? "server";
|
|
375
414
|
if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
|
|
@@ -378,8 +417,7 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
|
|
|
378
417
|
try {
|
|
379
418
|
const shared = c.get("shared") ?? {};
|
|
380
419
|
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
381
|
-
const
|
|
382
|
-
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
420
|
+
const head = resolveRequestHead(c, configHead, c.get("headDefaults"), pageHead);
|
|
383
421
|
if (renderMode !== "island") varyPagesResponse(c);
|
|
384
422
|
const { immediateProps, deferredMap } = separateDeferred(props);
|
|
385
423
|
const hasDeferred = Object.keys(deferredMap).length > 0;
|
|
@@ -473,15 +511,13 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
|
|
|
473
511
|
const renderMode = options?.renderMode ?? "server";
|
|
474
512
|
function buildMutationPageObj(props, errors) {
|
|
475
513
|
const shared = c.get("shared") ?? {};
|
|
476
|
-
const
|
|
477
|
-
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
478
|
-
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
514
|
+
const head = resolveRequestHead(c, configHead, c.get("headDefaults"), headFn ? headFn(c, props) : void 0);
|
|
479
515
|
return {
|
|
480
516
|
component: componentId,
|
|
481
517
|
props,
|
|
482
518
|
params: requestParams(c),
|
|
483
519
|
shared,
|
|
484
|
-
url:
|
|
520
|
+
url: requestPathWithSearch(c, hasActionKey(c.req.raw)),
|
|
485
521
|
errors,
|
|
486
522
|
...head && { head }
|
|
487
523
|
};
|
|
@@ -536,4 +572,4 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
|
|
|
536
572
|
throw e;
|
|
537
573
|
}
|
|
538
574
|
}
|
|
539
|
-
export { handlesPageLoaderNotFound as a, safeJsonStringify as i, handlePageGet as n, handlePageMutation as r, flattenValidationErrors as t };
|
|
575
|
+
export { handlesPageLoaderNotFound as a, safeJsonStringify as i, handlePageGet as n, ownsLoaderNotFoundBoundary as o, handlePageMutation as r, flattenValidationErrors as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-
|
|
1
|
+
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-bgQTi5QZ.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
|
|
3
3
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
4
|
-
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-
|
|
5
|
-
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-
|
|
4
|
+
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-wcnaQ5JG.mjs";
|
|
5
|
+
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-B1gkT_wC.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
|
|
8
8
|
import { isRecord } from "@void/deploy-core";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { n as isSameOrigin } from "./url-DaehRGKR.mjs";
|
|
2
|
+
// src/pages/redirect.ts
|
|
3
|
+
const REDIRECT_HEADER = "X-VoidPages-Redirect";
|
|
4
|
+
const REDIRECT_STATUSES = /* @__PURE__ */ new Set([
|
|
5
|
+
301,
|
|
6
|
+
302,
|
|
7
|
+
303,
|
|
8
|
+
307,
|
|
9
|
+
308
|
|
10
|
+
]);
|
|
11
|
+
/** Opt-in transport: fetch hides redirect Location headers and drops fragments from response.url. */
|
|
12
|
+
function pagesRedirectResponse(request, response) {
|
|
13
|
+
if (!REDIRECT_STATUSES.has(response.status) || !response.headers.has("Location")) return response;
|
|
14
|
+
const headers = new Headers(response.headers);
|
|
15
|
+
headers.append("Vary", REDIRECT_HEADER);
|
|
16
|
+
if (request.headers.get(REDIRECT_HEADER) !== "manual") return new Response(response.body, {
|
|
17
|
+
status: response.status,
|
|
18
|
+
statusText: response.statusText,
|
|
19
|
+
headers
|
|
20
|
+
});
|
|
21
|
+
headers.set(REDIRECT_HEADER, String(response.status));
|
|
22
|
+
headers.set("Cache-Control", "no-store");
|
|
23
|
+
return new Response(response.body, {
|
|
24
|
+
status: 200,
|
|
25
|
+
headers
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Follow negotiated redirects with HTTP method rules and origin checks. */
|
|
29
|
+
async function fetchPages(url, options, followGetRedirects = true) {
|
|
30
|
+
const headers = {
|
|
31
|
+
...options.headers,
|
|
32
|
+
[REDIRECT_HEADER]: "manual"
|
|
33
|
+
};
|
|
34
|
+
const init = {
|
|
35
|
+
...options,
|
|
36
|
+
headers
|
|
37
|
+
};
|
|
38
|
+
let redirectedTo;
|
|
39
|
+
for (let redirects = 0; redirects <= 20; redirects++) {
|
|
40
|
+
const response = await fetch(url.split("#")[0], init);
|
|
41
|
+
const status = Number(response.headers.get(REDIRECT_HEADER));
|
|
42
|
+
const location = response.headers.get("Location");
|
|
43
|
+
if (response.status !== 200 || !REDIRECT_STATUSES.has(status) || location === null) {
|
|
44
|
+
if (response.redirected) {
|
|
45
|
+
const destination = new URL(response.url);
|
|
46
|
+
const hash = url.indexOf("#");
|
|
47
|
+
if (hash !== -1) destination.hash = url.slice(hash);
|
|
48
|
+
redirectedTo = destination.href;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
response,
|
|
52
|
+
redirectedTo
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
await response.body?.cancel();
|
|
56
|
+
const base = new URL(url, window.location.origin + window.location.pathname + window.location.search);
|
|
57
|
+
const destination = new URL(location, response.url || base.href);
|
|
58
|
+
if (![
|
|
59
|
+
"http:",
|
|
60
|
+
"https:",
|
|
61
|
+
"capacitor:"
|
|
62
|
+
].includes(destination.protocol)) throw new Error(`Void Pages: refusing to redirect to a ${destination.protocol} URL.`);
|
|
63
|
+
if (!location.includes("#")) destination.hash = base.hash;
|
|
64
|
+
redirectedTo = destination.href;
|
|
65
|
+
const method = (init.method ?? "GET").toUpperCase();
|
|
66
|
+
const get = status === 303 && method !== "GET" && method !== "HEAD" || (status === 301 || status === 302) && method === "POST";
|
|
67
|
+
if (!isSameOrigin(destination, window.location.origin) || !followGetRedirects && (get || method === "GET" || method === "HEAD")) return {
|
|
68
|
+
response,
|
|
69
|
+
redirectedTo
|
|
70
|
+
};
|
|
71
|
+
if (get) {
|
|
72
|
+
for (const name of Object.keys(headers)) if (/^content-(?:type|length|encoding|language|location)$/i.test(name)) delete headers[name];
|
|
73
|
+
init.method = "GET";
|
|
74
|
+
init.body = void 0;
|
|
75
|
+
}
|
|
76
|
+
url = destination.href;
|
|
77
|
+
}
|
|
78
|
+
throw new TypeError("Too many Pages redirects.");
|
|
79
|
+
}
|
|
80
|
+
export { pagesRedirectResponse as n, fetchPages as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
3
|
+
import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
|
|
4
4
|
import { f as import_picocolors, i as dim } from "./output-DNVILSz2.mjs";
|
|
5
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
6
6
|
// src/cli/requests.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
3
|
+
import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
|
|
4
4
|
import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-DNVILSz2.mjs";
|
|
5
5
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
6
6
|
// src/cli/rollback.ts
|
|
@@ -74,7 +74,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
|
|
77
|
-
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
77
|
+
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-I4t3mt4R.mjs");
|
|
78
78
|
const context = resolveCloudflareOperationContext(root);
|
|
79
79
|
const status = await readCloudflareWorkerStatus(context);
|
|
80
80
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { i as writeFileIfChanged } from "./project-tsconfig-
|
|
2
|
+
import { i as writeFileIfChanged } from "./project-tsconfig-MyRJgufB.mjs";
|
|
3
3
|
import { existsSync, rmSync } from "node:fs";
|
|
4
4
|
// src/codegen/binding-types.ts
|
|
5
5
|
const bindingTypes = [
|
package/dist/runtime/auth.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as InferAuthInstance, c as VoidAuthConfigContext, d as defineAuth, f as getAuth, h as requireAuth, i as AuthUser, l as VoidAuthTypes, m as getUser, n as AuthSession, o as InferAuthSession, p as getSession, r as AuthState, s as VoidAuthConfig, t as AuthInstance, u as authContext } from "../auth-
|
|
1
|
+
import { a as InferAuthInstance, c as VoidAuthConfigContext, d as defineAuth, f as getAuth, h as requireAuth, i as AuthUser, l as VoidAuthTypes, m as getUser, n as AuthSession, o as InferAuthSession, p as getSession, r as AuthState, s as VoidAuthConfig, t as AuthInstance, u as authContext } from "../auth-CV9kXHKe.mjs";
|
|
2
2
|
export { AuthInstance, AuthSession, AuthState, AuthUser, InferAuthInstance, InferAuthSession, VoidAuthConfig, VoidAuthConfigContext, VoidAuthTypes, authContext, defineAuth, getAuth, getSession, getUser, requireAuth };
|
package/dist/runtime/auth.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as authContext, n as defineAuth, r as getAuth, i as getSession, a as getUser, o as requireAuth } from "../auth-
|
|
1
|
+
export { t as authContext, n as defineAuth, r as getAuth, i as getSession, a as getUser, o as requireAuth } from "../auth-aMuFOZeI.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.mjs";
|
|
2
2
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
3
3
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
4
4
|
export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as mysqlMigrationRunner, t as applyMySqlAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
|
|
2
|
-
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
2
|
+
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
|
|
3
3
|
// src/runtime/better-auth-mysql.ts
|
|
4
4
|
async function applyMigrations(env, migrationSchema) {
|
|
5
5
|
const { createConnection } = await import("mysql2/promise");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.mjs";
|
|
2
2
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
3
3
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
4
4
|
export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as pgMigrationRunner, n as applyPgAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
|
|
2
|
-
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
2
|
+
import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
|
|
3
3
|
import { t as disablePgPassFallback } from "../pg-DoyPxa_X.mjs";
|
|
4
4
|
// src/runtime/better-auth-pg.ts
|
|
5
5
|
async function applyMigrations(env, migrationSchema) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.mjs";
|
|
2
2
|
export declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
|
|
3
3
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
4
4
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as applySqliteAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
|
|
2
|
-
import { t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
2
|
+
import { t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
|
|
3
3
|
// src/runtime/better-auth.ts
|
|
4
4
|
async function applyMigrations(env, migrationSchema) {
|
|
5
5
|
const database = env.DB;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-react-DvQLe5Zb.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-solid-P9pEtKGp.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-svelte-B5j8irT6.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-vue-BEiAfavk.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
|
|
2
2
|
import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
|
|
3
3
|
import { n as createAuthClient, t as auth } from "../auth-client-6-Ft9i9T.mjs";
|
|
4
|
-
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-
|
|
4
|
+
import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -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-6fzr_ikp.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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-
|
|
1
|
+
import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-Dw7NF1t2.mjs";
|
|
2
2
|
import { n as eventStream } from "../sse-CxR30yMF.mjs";
|
|
3
3
|
// src/runtime/live-server.ts
|
|
4
4
|
const GENERATION_KEY = "connection:generation";
|
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-DBybyDt0.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/live.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-
|
|
1
|
+
export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-Dw7NF1t2.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as filterInternalBindings, M as ClientAssetTags, N as createClientAssetTags, O as createAssetFallback, P as createManifestLoader, j as prerenderPathsResponse, k as createWorkerFetch, r as CloudContext } from "../handler-
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet } from "../protocol-
|
|
1
|
+
import { A as filterInternalBindings, M as ClientAssetTags, N as createClientAssetTags, O as createAssetFallback, P as createManifestLoader, j as prerenderPathsResponse, k as createWorkerFetch, r as CloudContext } from "../handler-6fzr_ikp.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet } from "../protocol-YS3tbxWE.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Context, Hono, MiddlewareHandler, NotFoundHandler, TypedResponse } from "hono";
|
|
5
5
|
import { RouteDestination, RouteUrlInput } from "void/routes";
|
package/dist/runtime/routing.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as hasActionKey, c as searchWithoutActionKey, i as actionKeySegment, l as searchWithoutPreservedQuery, o as markActionKey, r as PRESERVED_QUERY_HEADER, s as queryKey, t as decodePagePath } from "../url-DaehRGKR.mjs";
|
|
2
|
+
import { n as pagesRedirectResponse } from "../redirect-Dqb4fEc5.mjs";
|
|
2
3
|
import { i as authDependentRequests, n as markStaticAsset, r as SHARED_CACHE_HEADERS, t as isUnchangedStaticAsset } from "../static-asset-marker-DsQKz6lt.mjs";
|
|
3
4
|
import { t as VoidAssetRewriteError } from "../handler-C9SnmeW1.mjs";
|
|
4
5
|
import { t as convertReturnValue } from "../response-HmNjB30w.mjs";
|
|
5
6
|
import { r as toUrlString, t as interpolateRouteParams } from "../route-url-CfCR4oMj.mjs";
|
|
6
7
|
import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-DJIVOrCh.mjs";
|
|
7
|
-
import { a as handlesPageLoaderNotFound, n as handlePageGet, r as handlePageMutation } from "../protocol-
|
|
8
|
-
import { t as decodePagePath } from "../url-CuoEn0o3.mjs";
|
|
8
|
+
import { a as handlesPageLoaderNotFound, n as handlePageGet, o as ownsLoaderNotFoundBoundary, r as handlePageMutation } from "../protocol-a3ZUQq5W.mjs";
|
|
9
9
|
import { t as renderDefaultErrorPage } from "../error-pages-COVBnzK7.mjs";
|
|
10
10
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11
11
|
import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, redirectToHttps, substituteParams } from "@void/edge";
|
|
@@ -246,11 +246,11 @@ function createPageMutationHandler(options) {
|
|
|
246
246
|
function createPagesFallback(options) {
|
|
247
247
|
const cachePolicy = createAssetCachePolicy(options.assetsDir);
|
|
248
248
|
return async (c) => {
|
|
249
|
-
if (
|
|
249
|
+
if (ownsLoaderNotFoundBoundary(c)) return c.newResponse(null, 404);
|
|
250
250
|
const path = c.req.path;
|
|
251
251
|
if (path === "/api" || path.startsWith("/api/") || c.req.method !== "GET" && c.req.method !== "HEAD") return c.text("Not Found", 404);
|
|
252
252
|
const assets = c.env?.ASSETS;
|
|
253
|
-
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 }));
|
|
253
|
+
const assetResponse = handlesPageLoaderNotFound(c) ? new Response("Not Found", { status: 404 }) : assets && typeof assets.fetch === "function" ? await assets.fetch(c.req.raw) : options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
|
|
254
254
|
const filePath = path.includes("/.") || path.substring(path.lastIndexOf("/") + 1).includes(".");
|
|
255
255
|
const pageNeedsSlash = options.trailingSlash && !path.endsWith("/") && options.pagePatterns?.some((pattern) => pattern.test(decodePagePath(`${path}/`)));
|
|
256
256
|
let directoryIndex = false;
|
|
@@ -1050,6 +1050,7 @@ function createRoutingRuntime(app, options = {}) {
|
|
|
1050
1050
|
c.originalUrl = () => originalUrls.get(c.req.raw) ?? null;
|
|
1051
1051
|
c.isRewritten = () => originalUrls.has(c.req.raw);
|
|
1052
1052
|
await next();
|
|
1053
|
+
c.res = pagesRedirectResponse(c.req.raw, c.res);
|
|
1053
1054
|
if (!trackAssetMisses) return;
|
|
1054
1055
|
if (c.res.status === 404 && !isRouteMiss(c, c.res)) intentionalNotFoundRequests.add(c.req.raw);
|
|
1055
1056
|
};
|
|
@@ -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-6fzr_ikp.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r 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 { r as AuthState } from "../auth-CV9kXHKe.mjs";
|
|
2
|
+
import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-ajs3LNrY.mjs";
|
|
3
|
+
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-C2zy0QBf.mjs";
|
|
4
4
|
export type WebSocketRouteMeta = {
|
|
5
5
|
name?: string;
|
|
6
6
|
key?: WebSocketInstanceKey;
|
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-C2zy0QBf.mjs";
|
|
2
2
|
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, l as toSlash, n as dirname, r as extname, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { t as glob } from "./dist-BWNkVq50.mjs";
|
|
3
|
-
import { p as readConfig } from "./config-
|
|
3
|
+
import { p as readConfig } from "./config-CzFdJYNA.mjs";
|
|
4
4
|
import { i as voidWarn } from "./log-D9hwSySP.mjs";
|
|
5
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
5
|
+
import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
|
|
6
6
|
import { i as staticLiteral, n as readStaticExports, o as bindingNames, r as staticExports, t as mayExportAll } from "./static-exports-DFkzL-NX.mjs";
|
|
7
7
|
import { n as isIdentifier, o as moduleExportName, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
|
|
8
8
|
import { t as MagicString } from "./dist-B6eN80gc.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { _ as validateSecretValues } from "./env-validation-
|
|
3
|
+
import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
|
|
4
|
+
import { _ as validateSecretValues } from "./env-validation-DeYNRp1d.mjs";
|
|
5
5
|
import { m as printSuccess, o as formatCount, p as note } from "./output-DNVILSz2.mjs";
|
|
6
6
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
7
7
|
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
|
|
@@ -97,7 +97,7 @@ async function resolveSecretBackend(root, args) {
|
|
|
97
97
|
}
|
|
98
98
|
async function resolveCloudflareSecretBackend(root, args) {
|
|
99
99
|
if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
100
|
-
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-
|
|
100
|
+
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-I4t3mt4R.mjs");
|
|
101
101
|
const context = resolveCloudflareOperationContext(root);
|
|
102
102
|
return {
|
|
103
103
|
target: "Cloudflare Worker",
|
|
@@ -61,4 +61,46 @@ function searchWithoutPreservedQuery(search, preserved) {
|
|
|
61
61
|
if (search === "?" + preserved) return "";
|
|
62
62
|
return search.endsWith("&" + preserved) ? search.slice(0, -preserved.length - 1) : search;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
// src/pages/url.ts
|
|
65
|
+
function isSameOrigin(url, origin) {
|
|
66
|
+
if (url.protocol === "capacitor:") {
|
|
67
|
+
const current = new URL(origin);
|
|
68
|
+
return current.protocol === "capacitor:" && url.host !== "" && url.host === current.host;
|
|
69
|
+
}
|
|
70
|
+
return url.origin === origin;
|
|
71
|
+
}
|
|
72
|
+
function isHexDigit(char) {
|
|
73
|
+
return char !== void 0 && (char >= "0" && char <= "9" || char >= "a" && char <= "f" || char >= "A" && char <= "F");
|
|
74
|
+
}
|
|
75
|
+
function tryDecodeURI(text) {
|
|
76
|
+
try {
|
|
77
|
+
return decodeURI(text);
|
|
78
|
+
} catch {
|
|
79
|
+
return text;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The path a page is matched on, decoded the way the server (Hono's getPath)
|
|
84
|
+
* decodes it: `/caf%C3%A9` becomes `/café`, while `%25`, reserved escapes such
|
|
85
|
+
* as `%2F` and malformed escapes stay encoded.
|
|
86
|
+
*/
|
|
87
|
+
function decodePagePath(path) {
|
|
88
|
+
if (!path.includes("%")) return path;
|
|
89
|
+
const escaped = path.split("%25").join("%2525");
|
|
90
|
+
try {
|
|
91
|
+
return decodeURI(escaped);
|
|
92
|
+
} catch {}
|
|
93
|
+
let decoded = "";
|
|
94
|
+
let index = 0;
|
|
95
|
+
while (index < escaped.length) {
|
|
96
|
+
let end = index;
|
|
97
|
+
while (escaped[end] === "%" && isHexDigit(escaped[end + 1]) && isHexDigit(escaped[end + 2])) end += 3;
|
|
98
|
+
if (end === index) decoded += escaped[index++];
|
|
99
|
+
else {
|
|
100
|
+
decoded += tryDecodeURI(escaped.slice(index, end));
|
|
101
|
+
index = end;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return decoded;
|
|
105
|
+
}
|
|
106
|
+
export { hasActionKey as a, searchWithoutActionKey as c, actionKeySegment as i, searchWithoutPreservedQuery as l, isSameOrigin as n, markActionKey as o, PRESERVED_QUERY_HEADER as r, queryKey as s, decodePagePath as t, withPageQuery as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-
|
|
2
|
+
import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-B1gkT_wC.mjs";
|
|
3
3
|
// src/shared/untrusted-env.ts
|
|
4
4
|
/** Authentication inputs that Wrangler may consume from the environment. */
|
|
5
5
|
const WRANGLER_AUTH_CREDENTIAL_ENV_VARS = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, c as resolve, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-
|
|
3
|
-
import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-
|
|
4
|
-
import { h as validateConfig, p as readConfig } from "./config-
|
|
2
|
+
import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-PxbinLLE.mjs";
|
|
3
|
+
import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-CUhCPMpK.mjs";
|
|
4
|
+
import { h as validateConfig, p as readConfig } from "./config-CzFdJYNA.mjs";
|
|
5
5
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { parseSync } from "vite";
|
|
7
7
|
import { appendSqliteClassMigration, isRecord } from "@void/deploy-core";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { b as readRootWranglerConfig } from "./wrangler-B1gkT_wC.mjs";
|