void 1.2.1 → 1.3.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-B4i71m7k.mjs} +3 -3
- package/dist/{application-analysis-fEqoSeMp.mjs → application-analysis-DYdVoMAY.mjs} +8 -6
- package/dist/{application-routing-DAhNP4u3.mjs → application-routing-C8EqRDfv.mjs} +3 -1
- package/dist/{auth-link-C87vGXM-.mjs → auth-link-BKwHPbdv.mjs} +3 -3
- package/dist/{auth-router-6I81r-ix.mjs → auth-router-DqLx8E0F.mjs} +2 -2
- package/dist/{better-auth-shared-D-6z0q0f.mjs → better-auth-shared-7FM3Uk2N.mjs} +48 -2
- package/dist/{build-cmd-ex1g-j_e.mjs → build-cmd-Dy4psnt1.mjs} +1 -1
- package/dist/{cache-oHzrnY3z.mjs → cache-DV37S6dl.mjs} +1 -1
- package/dist/{cancel-deploy-viAMD0Q_.mjs → cancel-deploy-DMPyu1Vt.mjs} +1 -1
- package/dist/{cf-build-output-BhVxldCw.mjs → cf-build-output-Bapzc_8Z.mjs} +102 -1
- package/dist/cf-build-output-DlBkWdNU.mjs +1 -0
- package/dist/cli/cli.mjs +41 -32
- package/dist/cli/cloudflare-operation-process.mjs +27 -6
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{client-BEkdj1kx.mjs → client-BEMtySaV.mjs} +8 -1
- package/dist/client-DyxPQnF_.mjs +1 -0
- package/dist/{cloudflare-cmd-DMzCv12s.mjs → cloudflare-cmd-BaqIigwI.mjs} +1 -1
- package/dist/{cloudflare-connect-CCRTVg-I.mjs → cloudflare-connect-pNLQmr_e.mjs} +1 -1
- package/dist/{cloudflare-operations-DsSaw2BT.mjs → cloudflare-operations-PCM4wucv.mjs} +1 -1
- package/dist/{cloudflare-operations-Dh9dEHJj.mjs → cloudflare-operations-vP3b5CQf.mjs} +3 -3
- package/dist/config-BTu1o3Dc.mjs +49 -0
- package/dist/{config-DQfHOKh9.d.mts → config-Du88-7Y8.d.mts} +2 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-k7R2rPVA.mjs → connect-DwVsBvVh.mjs} +4 -4
- package/dist/{create-project-DTuy-l0z.mjs → create-project-CgrnvzyA.mjs} +1 -1
- package/dist/{create-project-DV71ol5d.mjs → create-project-CjzbBlTv.mjs} +1 -1
- package/dist/{db-DVOkLH5X.mjs → db-rvo64snS.mjs} +13 -13
- package/dist/{delete-BbP5eopu.mjs → delete-DWX6dP4M.mjs} +1 -1
- package/dist/deploy-CtHE2A3R.mjs +2 -0
- package/dist/{deploy-7H32EnUs.mjs → deploy-hRPvw8ci.mjs} +229 -69
- package/dist/{deploy-managed-static-DlvcvnQT.mjs → deploy-managed-static-CDYA2p3L.mjs} +30 -14
- package/dist/{deploy-transport-BzGEj0Ge.mjs → deploy-transport-JCxw7QDi.mjs} +3 -3
- package/dist/deploy.mjs +4 -3
- package/dist/{dispatch-DoUnxTNo.mjs → dispatch-OVLeWW8K.mjs} +71 -2
- package/dist/{domain-CA2wBgra.mjs → domain-CH5iBD9Y.mjs} +2 -2
- package/dist/{email-DXpCc77w.mjs → email-CbTO1l78.mjs} +58 -9
- package/dist/{email-cloudflare-D03g2TkS.mjs → email-cloudflare-B8-pq_-W.mjs} +106 -5
- package/dist/{env-DgOQ9_8S.mjs → env-BBdw236G.mjs} +3 -3
- package/dist/{env-BJjULvL0.mjs → env-BaMz0j7H.mjs} +6 -1
- package/dist/{env-validation-BmsdCZEk.mjs → env-validation-BfBVvBNe.mjs} +1 -1
- package/dist/{env-validation-Dwq3PJzK.mjs → env-validation-XcukUlFM.mjs} +1 -1
- package/dist/{gen-BfmcIi2g.mjs → gen-CCx3t2Ju.mjs} +1 -1
- package/dist/gen-TgXy93Rr.mjs +1 -0
- package/dist/{github-cmd-CY9LUqLh.mjs → github-cmd-BzkRLkbg.mjs} +1 -1
- package/dist/{handler-BbkSPzGF.d.mts → handler-CQv5YDS0.d.mts} +1 -1
- package/dist/{help-CxSlPpzJ.mjs → help-CKbrhZha.mjs} +16 -1
- package/dist/help-qOZr3wng.mjs +1 -0
- package/dist/index.d.mts +2 -4
- package/dist/index.mjs +317 -122
- package/dist/{info-7VDlhtyy.mjs → info-oBm8yK8J.mjs} +2 -2
- package/dist/{init-DxYyOs4-.mjs → init-CBp_uMve.mjs} +217 -197
- package/dist/{link-Ddmod1dZ.mjs → link-Dt_QXmM4.mjs} +2 -2
- package/dist/{list-MogaugiO.mjs → list-DF6asTdt.mjs} +2 -2
- package/dist/{live-Bt8Y_0bg.d.mts → live-CXJ9yC98.d.mts} +1 -1
- package/dist/{local-d1-BHBnKWRb.mjs → local-d1-CUhH3qtj.mjs} +1 -1
- package/dist/{login-Cttnagmm.mjs → login-BjSyhXlT.mjs} +2 -2
- package/dist/login-Cdo8Aco1.mjs +1 -0
- package/dist/{logs-CAszUWZI.mjs → logs-DmvBl6xA.mjs} +2 -2
- package/dist/{migrate-DyT2jJ8y.mjs → migrate-BXRHpYwR.mjs} +1 -1
- package/dist/migrate-COPncCGx.mjs +1 -0
- package/dist/nitro.mjs +2 -2
- package/dist/{node-WB7c2N4L.mjs → node-DtD7ZiPf.mjs} +4 -4
- package/dist/{operator-args-UnE8Y2eK.mjs → operator-args-BsJIYXaT.mjs} +8 -1
- package/dist/operator-cmd-DDiX7Y3f.mjs +1 -0
- package/dist/{operator-cmd-skshjMGl.mjs → operator-cmd-DjZKGGgN.mjs} +4 -3
- package/dist/pages/client.d.mts +17 -4
- package/dist/pages/client.mjs +161 -29
- package/dist/pages/index.d.mts +18 -2
- package/dist/pages/index.mjs +2 -52
- 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-BgnuMbml.mjs} +3 -3
- package/dist/{platform-auth-protection-SHhvim1L.mjs → platform-auth-protection-NjRejttU.mjs} +2 -2
- package/dist/{platform-auth-recovery-DXVWs-wA.mjs → platform-auth-recovery-Ug12d9W5.mjs} +2 -2
- package/dist/{platform-cmd-PiNRkopU.mjs → platform-cmd-BYKLMPCn.mjs} +1 -1
- package/dist/{platform-cmd-D5I1beUX.mjs → platform-cmd-HByuZAO7.mjs} +4 -4
- package/dist/{platform-domain-jpmBfZeb.mjs → platform-domain-DLSQ8GF8.mjs} +2 -2
- package/dist/{platform-lifecycle-DyKmuNY6.mjs → platform-lifecycle-3dwFJmnq.mjs} +102 -40
- package/dist/{platform-lifecycle-DH3Yr1qQ.mjs → platform-lifecycle-BRqcxerG.mjs} +1 -1
- package/dist/{platform-management-7m-PLaPJ.mjs → platform-management-ZK6XcbCo.mjs} +1 -1
- package/dist/{platform-management--vDwSn35.mjs → platform-management-ZZ6bQM5j.mjs} +1 -1
- package/dist/{platform-recovery-BiNpZZab.mjs → platform-recovery-8vNE5dNN.mjs} +2 -2
- package/dist/{plugin-inference-DUjCd55H.mjs → plugin-inference-CeiB6BG5.mjs} +53 -18
- package/dist/{prepare-BcAE5Sdj.mjs → prepare-5BR7Splm.mjs} +1 -1
- package/dist/prepare-B3VrSF1Z.mjs +1 -0
- package/dist/{prepare-DA-17DhO.mjs → prepare-Dseww74N.mjs} +4 -4
- 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-CjLNNxwe.mjs} +15 -15
- package/dist/{project-team-CQBNveX3.mjs → project-team-DE5drjcl.mjs} +1 -1
- package/dist/{project-token-CCalFyQf.mjs → project-token-XEYEXfiJ.mjs} +1 -1
- package/dist/{project-zero-trust-DPnkiEuT.mjs → project-zero-trust-6VPU8zmV.mjs} +1 -1
- package/dist/{protocol-BBDpJz3G.d.mts → protocol-BekmFxCI.d.mts} +2 -2
- package/dist/{provision-DtROpNNI.mjs → provision-B7UFrBH7.mjs} +1 -1
- package/dist/{provision-BFLCrnUp.mjs → provision-Chq0NRAV.mjs} +1 -1
- package/dist/{requests-BpH0kImL.mjs → requests-CG-Pj8ze.mjs} +1 -1
- package/dist/{rollback-CXS1tAa-.mjs → rollback-CIrm2txZ.mjs} +2 -2
- package/dist/{route-types-BZi26DVS.mjs → route-types--PAOzHlH.mjs} +49 -28
- package/dist/routes-stub.d.mts +22 -13
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +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 +2 -2
- package/dist/runtime/routing.mjs +4 -3
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-8IzYXiU_.mjs → scan-N9WzdcAl.mjs} +302 -23
- package/dist/{secret-BbXHfLAt.mjs → secret-BL6g7mF5.mjs} +3 -3
- 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-DmaZNTYW.mjs} +1 -1
- package/dist/worker-conditions-AWFRcFxR.mjs +11 -0
- package/dist/{wrangler-F96NnLyb.mjs → wrangler-CDiEBCdS.mjs} +2 -1
- package/dist/wrangler-DOPr4jyI.mjs +1 -0
- package/dist/{wrapper-D3sZyh2C.mjs → wrapper-CEiDeCqD.mjs} +6 -10
- package/dist/{ws-BH-im_tX.d.mts → ws-D1zWiB_P.d.mts} +1 -1
- package/docs/guide/auth.md +3 -1
- 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 +19 -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/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 +38 -2
- package/docs/guide/type-safety.md +7 -7
- package/docs/guide/websockets.md +4 -2
- package/docs/reference/api/pages.md +4 -4
- 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/structure.md +3 -1
- package/package.json +8 -7
- 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/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,13 +1,13 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { i as loadVoidAuthConfig } from "./config-BTu1o3Dc.mjs";
|
|
3
3
|
import { c as getDatabaseCasing, p as readConfig } from "./config-DHgSEWT7.mjs";
|
|
4
4
|
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-Itv1f4WC.mjs";
|
|
5
5
|
import { n as generateDbDts } from "./db-types-NGxPwnlt.mjs";
|
|
6
6
|
import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { s as loadLocalEnv } from "./env-BaMz0j7H.mjs";
|
|
8
8
|
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-BicfKBhV.mjs";
|
|
9
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
10
|
-
import { n as generateQueueTypes, t as generateRouteTypes } from "./route-types
|
|
9
|
+
import { t as analyzeApplication } from "./application-routing-C8EqRDfv.mjs";
|
|
10
|
+
import { n as generateQueueTypes, t as generateRouteTypes } from "./route-types--PAOzHlH.mjs";
|
|
11
11
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BQfyvQKX.mjs";
|
|
12
12
|
import { existsSync, rmSync } from "node:fs";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
@@ -3,6 +3,11 @@ import { mkdirSync, writeFileSync } from "node:fs";
|
|
|
3
3
|
import { extractPageDataFromHtml } from "@void/isr/core";
|
|
4
4
|
//#region src/prerender-render.ts
|
|
5
5
|
const PAGE_DATA_SCRIPT_ID = "__VOID_PAGE_DATA__";
|
|
6
|
+
function assertNoPrerenderFailures(failed) {
|
|
7
|
+
if (failed.length === 0) return;
|
|
8
|
+
const details = failed.map(({ path, error }) => ` ${path}: ${error}`).join("\n");
|
|
9
|
+
throw new Error(`${failed.length} page(s) failed to prerender:\n${details}`);
|
|
10
|
+
}
|
|
6
11
|
function outputFileForPath(path) {
|
|
7
12
|
return path === "/" ? "index.html" : `${path.slice(1)}.html`;
|
|
8
13
|
}
|
|
@@ -93,6 +98,13 @@ async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData,
|
|
|
93
98
|
try {
|
|
94
99
|
const response = await fetchPath(path);
|
|
95
100
|
const html = await response.text();
|
|
101
|
+
if ([
|
|
102
|
+
301,
|
|
103
|
+
302,
|
|
104
|
+
303,
|
|
105
|
+
307,
|
|
106
|
+
308
|
|
107
|
+
].includes(response.status) && response.headers.get("Location")) continue;
|
|
96
108
|
if (!response.ok) {
|
|
97
109
|
const error = `HTTP ${response.status}`;
|
|
98
110
|
result.failed.push({
|
|
@@ -133,4 +145,4 @@ async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData,
|
|
|
133
145
|
};
|
|
134
146
|
}
|
|
135
147
|
//#endregion
|
|
136
|
-
export {
|
|
148
|
+
export { renderPrerenderPaths as i, outputFileForPath as n, readPrerenderPathsResponse as r, assertNoPrerenderFailures as t };
|
|
@@ -6,6 +6,7 @@ export type PrerenderResult = {
|
|
|
6
6
|
error: string;
|
|
7
7
|
}>;
|
|
8
8
|
};
|
|
9
|
+
export declare function assertNoPrerenderFailures(failed: PrerenderResult["failed"]): void;
|
|
9
10
|
export declare function outputFileForPath(path: string): string;
|
|
10
11
|
export declare function readPrerenderPathsResponse(response: Response): Promise<Array<string>>;
|
|
11
12
|
/** Shared renderer for local Workers and the isolated Node prerender child. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as
|
|
1
|
+
export { t as assertNoPrerenderFailures, n as outputFileForPath, r as readPrerenderPathsResponse, i as renderPrerenderPaths } from "./prerender-render-CaShbHJ3.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-BEMtySaV.mjs";
|
|
5
5
|
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
@@ -38,77 +38,77 @@ async function runProjectsCommand(root) {
|
|
|
38
38
|
async function runProjectCommand(root, args) {
|
|
39
39
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
40
40
|
if (args.subcommand === "status") {
|
|
41
|
-
const { runListCommand } = await import("./list-
|
|
41
|
+
const { runListCommand } = await import("./list-DF6asTdt.mjs");
|
|
42
42
|
return runListCommand(root, args.name || void 0);
|
|
43
43
|
}
|
|
44
44
|
if (args.subcommand === "link") {
|
|
45
45
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
46
|
-
const { runLink } = await import("./link-
|
|
46
|
+
const { runLink } = await import("./link-Dt_QXmM4.mjs");
|
|
47
47
|
return runLink(root, args.name || void 0);
|
|
48
48
|
}
|
|
49
49
|
if (args.subcommand === "list") {
|
|
50
50
|
if (cloudflare) {
|
|
51
|
-
const { runListCommand } = await import("./list-
|
|
51
|
+
const { runListCommand } = await import("./list-DF6asTdt.mjs");
|
|
52
52
|
return runListCommand(root);
|
|
53
53
|
}
|
|
54
54
|
return runProjectsCommand(root);
|
|
55
55
|
}
|
|
56
56
|
if (args.subcommand === "token") {
|
|
57
57
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
58
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
58
|
+
const { runProjectTokenCommand } = await import("./project-token-XEYEXfiJ.mjs");
|
|
59
59
|
return runProjectTokenCommand(root, args);
|
|
60
60
|
}
|
|
61
61
|
if (args.subcommand === "team") {
|
|
62
62
|
if (args.action === "") {
|
|
63
|
-
const { printHelpPage } = await import("./help-
|
|
63
|
+
const { printHelpPage } = await import("./help-qOZr3wng.mjs");
|
|
64
64
|
printHelpPage(["project", "team"]);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
68
68
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
69
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
69
|
+
const { runProjectTeamCommand } = await import("./project-team-DE5drjcl.mjs");
|
|
70
70
|
return runProjectTeamCommand(root, args);
|
|
71
71
|
}
|
|
72
72
|
if (args.subcommand === "zero-trust") {
|
|
73
73
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
74
74
|
if (args.action === "") {
|
|
75
|
-
const { printHelpPage } = await import("./help-
|
|
75
|
+
const { printHelpPage } = await import("./help-qOZr3wng.mjs");
|
|
76
76
|
printHelpPage(["project", "zero-trust"]);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
const action = args.action;
|
|
80
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
80
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-6VPU8zmV.mjs");
|
|
81
81
|
return runProjectZeroTrustCommand(root, {
|
|
82
82
|
...args,
|
|
83
83
|
action
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (args.subcommand === "logs") {
|
|
87
|
-
const { runLogsCommand } = await import("./logs-
|
|
87
|
+
const { runLogsCommand } = await import("./logs-DmvBl6xA.mjs");
|
|
88
88
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
89
89
|
}
|
|
90
90
|
if (args.subcommand === "requests") {
|
|
91
91
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
92
|
-
const { runRequestsCommand } = await import("./requests-
|
|
92
|
+
const { runRequestsCommand } = await import("./requests-CG-Pj8ze.mjs");
|
|
93
93
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
94
94
|
}
|
|
95
95
|
if (args.subcommand === "rollback") {
|
|
96
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
96
|
+
const { runRollbackCommand } = await import("./rollback-CIrm2txZ.mjs");
|
|
97
97
|
return runRollbackCommand(root, args.deployId || void 0, args.platform);
|
|
98
98
|
}
|
|
99
99
|
if (args.subcommand === "cancel") {
|
|
100
100
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
101
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
101
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-DMPyu1Vt.mjs");
|
|
102
102
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
103
103
|
}
|
|
104
104
|
if (args.subcommand === "delete") {
|
|
105
105
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
106
|
-
const { runDeleteCommand } = await import("./delete-
|
|
106
|
+
const { runDeleteCommand } = await import("./delete-DWX6dP4M.mjs");
|
|
107
107
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
108
108
|
}
|
|
109
109
|
if (args.subcommand === "purge-cache") {
|
|
110
110
|
if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
|
|
111
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
111
|
+
const { runPurgeCacheCommand } = await import("./cache-DV37S6dl.mjs");
|
|
112
112
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, i as getAccountCredential } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-
|
|
4
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BEMtySaV.mjs";
|
|
5
5
|
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-team.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-BEMtySaV.mjs";
|
|
5
5
|
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { r as requireProjectBySlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-token.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-BEMtySaV.mjs";
|
|
5
5
|
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-zero-trust.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-C8K_iGe6.mjs";
|
|
2
|
-
import { a as PageRenderMode, t as DevCssAsset } from "./types-
|
|
3
|
-
import { n as CloudBindings, r as CloudContext } from "./handler-
|
|
2
|
+
import { a as PageRenderMode, t as DevCssAsset } from "./types-w72dljaA.mjs";
|
|
3
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-CQv5YDS0.mjs";
|
|
4
4
|
//#region src/pages/protocol.d.ts
|
|
5
5
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
6
6
|
declare function safeJsonStringify(value: unknown): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { i as voidWarn, r as voidLog } from "./log-BMwmN5Ae.mjs";
|
|
3
|
-
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-
|
|
3
|
+
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-CDiEBCdS.mjs";
|
|
4
4
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
|
|
5
5
|
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-8jEYIeim.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-
|
|
1
|
+
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-B7UFrBH7.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-BEMtySaV.mjs";
|
|
5
5
|
import { f as import_picocolors, i as dim } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/requests.ts
|
|
7
7
|
async function runRequestsCommand(root, range, status) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-BEMtySaV.mjs";
|
|
5
5
|
import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/rollback.ts
|
|
7
7
|
async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
@@ -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-PCM4wucv.mjs");
|
|
78
78
|
const context = resolveCloudflareOperationContext(root);
|
|
79
79
|
const status = await readCloudflareWorkerStatus(context);
|
|
80
80
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -99,19 +99,29 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
|
|
|
99
99
|
lines.push(" action: never;");
|
|
100
100
|
lines.push(" };");
|
|
101
101
|
lines.push("");
|
|
102
|
+
lines.push(" type PageActionBody<P> = [Extract<P, { body: unknown }>] extends [never]");
|
|
103
|
+
lines.push(" ? Record<string, unknown>");
|
|
104
|
+
lines.push(" : Extract<P, { body: unknown }>[\"body\"];");
|
|
105
|
+
lines.push("");
|
|
106
|
+
lines.push(" type PageNamedActionBody<P, K> = P extends { actions: infer A }");
|
|
107
|
+
lines.push(" ? K extends keyof A");
|
|
108
|
+
lines.push(" ? A[K] extends { body: infer B }");
|
|
109
|
+
lines.push(" ? B");
|
|
110
|
+
lines.push(" : Record<string, unknown>");
|
|
111
|
+
lines.push(" : never");
|
|
112
|
+
lines.push(" : never;");
|
|
113
|
+
lines.push("");
|
|
114
|
+
lines.push(" type PageActionUrl<K extends string, P> = P extends { body: any }");
|
|
115
|
+
lines.push(" ? K");
|
|
116
|
+
lines.push(" : P extends { actions: infer A }");
|
|
117
|
+
lines.push(" ? `${K}?${keyof A & string}`");
|
|
118
|
+
lines.push(" : never;");
|
|
119
|
+
lines.push("");
|
|
102
120
|
lines.push(" export type ResolveActionBody<U extends string> =");
|
|
103
121
|
lines.push(" ParseActionUrl<U>[\"base\"] extends keyof PageActionMap");
|
|
104
122
|
lines.push(" ? ParseActionUrl<U>[\"action\"] extends never");
|
|
105
|
-
lines.push(" ? PageActionMap[ParseActionUrl<U>[\"base\"]]
|
|
106
|
-
lines.push("
|
|
107
|
-
lines.push(" : Record<string, unknown>");
|
|
108
|
-
lines.push(" : PageActionMap[ParseActionUrl<U>[\"base\"]] extends { actions: infer A }");
|
|
109
|
-
lines.push(" ? ParseActionUrl<U>[\"action\"] extends keyof A");
|
|
110
|
-
lines.push(" ? A[ParseActionUrl<U>[\"action\"]] extends { body: infer B }");
|
|
111
|
-
lines.push(" ? B");
|
|
112
|
-
lines.push(" : Record<string, unknown>");
|
|
113
|
-
lines.push(" : never");
|
|
114
|
-
lines.push(" : never");
|
|
123
|
+
lines.push(" ? PageActionBody<PageActionMap[ParseActionUrl<U>[\"base\"]]>");
|
|
124
|
+
lines.push(" : PageNamedActionBody<PageActionMap[ParseActionUrl<U>[\"base\"]], ParseActionUrl<U>[\"action\"]>");
|
|
115
125
|
lines.push(" : Record<string, unknown>;");
|
|
116
126
|
lines.push("");
|
|
117
127
|
lines.push(" export type ResolveActionParams<U extends string> =");
|
|
@@ -122,20 +132,20 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
|
|
|
122
132
|
lines.push(" : never;");
|
|
123
133
|
lines.push("");
|
|
124
134
|
lines.push(" export type HasActionParams<U extends string> =");
|
|
125
|
-
lines.push(" ResolveActionParams<U> extends
|
|
135
|
+
lines.push(" [ResolveActionParams<U>] extends [never]");
|
|
136
|
+
lines.push(" ? false");
|
|
137
|
+
lines.push(" : ResolveActionParams<U> extends Record<string, string> ? true : false;");
|
|
138
|
+
lines.push("");
|
|
139
|
+
lines.push(" type ActionFormBaseOptions = { resetOnSuccess?: boolean };");
|
|
126
140
|
lines.push("");
|
|
127
|
-
lines.push(" export type ActionFormOptions<U extends string> =");
|
|
128
|
-
lines.push(" HasActionParams<U> extends true
|
|
141
|
+
lines.push(" export type ActionFormOptions<U extends string> = ActionFormBaseOptions &");
|
|
142
|
+
lines.push(" (HasActionParams<U> extends true");
|
|
143
|
+
lines.push(" ? { params: ResolveActionParams<U> }");
|
|
144
|
+
lines.push(" : { params?: never });");
|
|
129
145
|
lines.push("");
|
|
130
|
-
lines.push(" export type ActionUrl =");
|
|
131
|
-
lines.push("
|
|
132
|
-
lines.push("
|
|
133
|
-
lines.push(" }[keyof PageActionMap]");
|
|
134
|
-
lines.push(" | {");
|
|
135
|
-
lines.push(" [K in keyof PageActionMap]: PageActionMap[K] extends { actions: infer A }");
|
|
136
|
-
lines.push(" ? `${K & string}?${keyof A & string}`");
|
|
137
|
-
lines.push(" : never;");
|
|
138
|
-
lines.push(" }[keyof PageActionMap]");
|
|
146
|
+
lines.push(" export type ActionUrl = {");
|
|
147
|
+
lines.push(" [K in keyof PageActionMap]: PageActionUrl<K & string, PageActionMap[K]>;");
|
|
148
|
+
lines.push(" }[keyof PageActionMap]");
|
|
139
149
|
lines.push("");
|
|
140
150
|
lines.push(" interface RouteMap {");
|
|
141
151
|
const routesByPattern = /* @__PURE__ */ new Map();
|
|
@@ -190,25 +200,36 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
|
|
|
190
200
|
const actionPages = scan.pages.pages.filter((p) => p.methods.includes("action") || p.methods.includes("actions"));
|
|
191
201
|
if (actionPages.length > 0 && pagesDir) {
|
|
192
202
|
lines.push(" interface PageActionMap {");
|
|
203
|
+
const bodiesByPattern = /* @__PURE__ */ new Map();
|
|
193
204
|
for (const page of actionPages) {
|
|
194
205
|
const hasAction = page.methods.includes("action");
|
|
195
206
|
const hasActions = page.methods.includes("actions");
|
|
196
207
|
if (hasAction && hasActions) throw new Error(`pages: Page '${page.pattern}' exports both "action" and "actions". Use one or the other.`);
|
|
197
|
-
|
|
208
|
+
const body = [];
|
|
198
209
|
const importPath = relative(outDir, `${pagesDir}/${page.serverPath}`);
|
|
199
210
|
if (hasActions) {
|
|
200
211
|
const actionsImport = `(typeof import(${JSON.stringify(importPath)}))["actions"]`;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
212
|
+
body.push(` actions: { [K in keyof ${actionsImport}]: {`);
|
|
213
|
+
body.push(` body: ExtractInput<${actionsImport}[K]["__validators"]> extends { body: infer B } ? B : Record<string, unknown>;`);
|
|
214
|
+
body.push(" } };");
|
|
204
215
|
} else {
|
|
205
216
|
const importExpr = `(typeof import(${JSON.stringify(importPath)}))["action"]`;
|
|
206
|
-
|
|
217
|
+
body.push(` body: ExtractInput<${importExpr}["__validators"]> extends { body: infer B } ? B : Record<string, unknown>;`);
|
|
207
218
|
}
|
|
208
219
|
if (page.params.length > 0) {
|
|
209
220
|
const paramsType = page.params.map((p) => `${p}: string`).join("; ");
|
|
210
|
-
|
|
221
|
+
body.push(` params: { ${paramsType} };`);
|
|
211
222
|
}
|
|
223
|
+
const bodies = bodiesByPattern.get(page.pattern);
|
|
224
|
+
if (bodies) bodies.push(body);
|
|
225
|
+
else bodiesByPattern.set(page.pattern, [body]);
|
|
226
|
+
}
|
|
227
|
+
for (const [pattern, bodies] of bodiesByPattern) {
|
|
228
|
+
lines.push(` ${JSON.stringify(pattern)}: {`);
|
|
229
|
+
bodies.forEach((body, index) => {
|
|
230
|
+
if (index > 0) lines.push(" } | {");
|
|
231
|
+
lines.push(...body);
|
|
232
|
+
});
|
|
212
233
|
lines.push(" };");
|
|
213
234
|
}
|
|
214
235
|
lines.push(" }");
|
package/dist/routes-stub.d.mts
CHANGED
|
@@ -26,29 +26,38 @@ export type ParseActionUrl<U extends string> = U extends `${infer Base}?${infer
|
|
|
26
26
|
action: never;
|
|
27
27
|
};
|
|
28
28
|
/** Resolve body type for a useForm URL (single action or named action) */
|
|
29
|
-
|
|
30
|
-
body:
|
|
31
|
-
}
|
|
29
|
+
type PageActionBody<P> = [Extract<P, {
|
|
30
|
+
body: unknown;
|
|
31
|
+
}>] extends [never] ? Record<string, unknown> : Extract<P, {
|
|
32
|
+
body: unknown;
|
|
33
|
+
}>["body"];
|
|
34
|
+
type PageNamedActionBody<P, K> = P extends {
|
|
32
35
|
actions: infer A;
|
|
33
|
-
} ?
|
|
36
|
+
} ? K extends keyof A ? A[K] extends {
|
|
34
37
|
body: infer B;
|
|
35
|
-
} ? B : Record<string, unknown> : never : never
|
|
38
|
+
} ? B : Record<string, unknown> : never : never;
|
|
39
|
+
export type ResolveActionBody<U extends string> = ParseActionUrl<U>["base"] extends keyof PageActionMap ? ParseActionUrl<U>["action"] extends never ? PageActionBody<PageActionMap[ParseActionUrl<U>["base"]]> : PageNamedActionBody<PageActionMap[ParseActionUrl<U>["base"]], ParseActionUrl<U>["action"]> : Record<string, unknown>;
|
|
36
40
|
/** Resolve params type */
|
|
37
41
|
export type ResolveActionParams<U extends string> = ParseActionUrl<U>["base"] extends keyof PageActionMap ? PageActionMap[ParseActionUrl<U>["base"]] extends {
|
|
38
42
|
params: infer P;
|
|
39
43
|
} ? P : never : never;
|
|
40
44
|
/** Has params check */
|
|
41
|
-
export type HasActionParams<U extends string> = ResolveActionParams<U> extends Record<string, string> ? true : false;
|
|
45
|
+
export type HasActionParams<U extends string> = [ResolveActionParams<U>] extends [never] ? false : ResolveActionParams<U> extends Record<string, string> ? true : false;
|
|
46
|
+
type ActionFormBaseOptions = {
|
|
47
|
+
resetOnSuccess?: boolean;
|
|
48
|
+
};
|
|
42
49
|
/** Form options type (requires params for dynamic routes) */
|
|
43
|
-
export type ActionFormOptions<U extends string> = HasActionParams<U> extends true ? {
|
|
50
|
+
export type ActionFormOptions<U extends string> = ActionFormBaseOptions & (HasActionParams<U> extends true ? {
|
|
44
51
|
params: ResolveActionParams<U>;
|
|
45
52
|
} : {
|
|
46
53
|
params?: never;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type ActionUrl = { [K in keyof PageActionMap]: PageActionMap[K] extends {
|
|
54
|
+
});
|
|
55
|
+
type PageActionUrl<K extends string, P> = P extends {
|
|
50
56
|
body: unknown;
|
|
51
|
-
} ? K :
|
|
57
|
+
} ? K : P extends {
|
|
52
58
|
actions: infer A;
|
|
53
|
-
} ? `${K
|
|
54
|
-
|
|
59
|
+
} ? `${K}?${keyof A & string}` : never;
|
|
60
|
+
/** Valid useForm URLs — single-action pages + "page?name" combos + default actions */
|
|
61
|
+
export type ActionUrl = { [K in keyof PageActionMap]: PageActionUrl<K & string, PageActionMap[K]>; }[keyof PageActionMap];
|
|
62
|
+
//#endregion
|
|
63
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as mysqlMigrationRunner, t as applyMySqlAuthMigrations } from "../auth-migrations-BO27GDNr.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-7FM3Uk2N.mjs";
|
|
3
3
|
//#region src/runtime/better-auth-mysql.ts
|
|
4
4
|
async function applyMigrations(env, migrationSchema) {
|
|
5
5
|
const { createConnection } = await import("mysql2/promise");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as pgMigrationRunner, n as applyPgAuthMigrations } from "../auth-migrations-BO27GDNr.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-7FM3Uk2N.mjs";
|
|
3
3
|
import { t as disablePgPassFallback } from "../pg-J2HbZIkX.mjs";
|
|
4
4
|
//#region src/runtime/better-auth-pg.ts
|
|
5
5
|
async function applyMigrations(env, migrationSchema) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as applySqliteAuthMigrations } from "../auth-migrations-BO27GDNr.mjs";
|
|
2
|
-
import { t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
2
|
+
import { t as createVoidAuthRuntime } from "../better-auth-shared-7FM3Uk2N.mjs";
|
|
3
3
|
//#region src/runtime/better-auth.ts
|
|
4
4
|
async function applyMigrations(env, migrationSchema) {
|
|
5
5
|
const database = env.DB;
|
|
@@ -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-CQv5YDS0.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-CXJ9yC98.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,5 +1,5 @@
|
|
|
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-CQv5YDS0.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet } from "../protocol-BekmFxCI.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
|
package/dist/runtime/routing.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { t as convertReturnValue } from "../response-Tn7rU0MV.mjs";
|
|
|
3
3
|
import { i as searchWithoutActionKey, n as hasActionKey, r as markActionKey, t as actionKeySegment } from "../action-key-XZ9HkWAO.mjs";
|
|
4
4
|
import { n as handlePageGet, r as handlePageMutation } from "../protocol-DimNxVRr.mjs";
|
|
5
5
|
import { t as VoidAssetRewriteError } from "../handler-BZ1t7-Rv.mjs";
|
|
6
|
+
import { n as markStaticAsset } from "../static-asset-marker-Btf-6oCD.mjs";
|
|
6
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
8
|
import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, substituteParams } from "@void/edge";
|
|
8
9
|
//#region src/runtime/routing-worker.ts
|
|
@@ -189,7 +190,7 @@ function createPagesFallback(options) {
|
|
|
189
190
|
if (path === "/api" || path.startsWith("/api/") || c.req.method !== "GET" && c.req.method !== "HEAD") return c.text("Not Found", 404);
|
|
190
191
|
const assets = c.env?.ASSETS;
|
|
191
192
|
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);
|
|
193
|
+
if (assetResponse.status !== 404) return markStaticAsset(c, await cachePolicy(c.req.raw, c.env, assetResponse));
|
|
193
194
|
const fallback = options.fallbackRules ? await options.routing.applyFallback(c, options.fallbackRules) : void 0;
|
|
194
195
|
if (fallback) return fallback;
|
|
195
196
|
if (path.includes("/.") || path.substring(path.lastIndexOf("/") + 1).includes(".")) return options.errors.serveCustomPage(c, 404, "Not Found");
|
|
@@ -207,7 +208,7 @@ function createSsrFallback(options) {
|
|
|
207
208
|
const binding = c.env?.ASSETS;
|
|
208
209
|
if (!binding || typeof binding.fetch !== "function") return options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
|
|
209
210
|
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);
|
|
211
|
+
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
212
|
};
|
|
212
213
|
return async (c) => {
|
|
213
214
|
if (options.nodeTarget && options.fallbackRules) {
|
|
@@ -237,7 +238,7 @@ function createAssetNotFound(options) {
|
|
|
237
238
|
const assets = c.env?.ASSETS;
|
|
238
239
|
if (assets && typeof assets.fetch === "function") {
|
|
239
240
|
const response = await assets.fetch(c.req.raw);
|
|
240
|
-
if (response.status !== 404) return cachePolicy(c.req.raw, c.env, response);
|
|
241
|
+
if (response.status !== 404) return markStaticAsset(c, await cachePolicy(c.req.raw, c.env, response));
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
244
|
return (options.fallbackRules ? await options.routing.applyFallback(c, options.fallbackRules) : void 0) ?? options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
|
|
@@ -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-CQv5YDS0.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as AuthState } from "../auth-DkcFflXV.mjs";
|
|
2
2
|
import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-DVk2DkTW.mjs";
|
|
3
|
-
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-
|
|
3
|
+
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-D1zWiB_P.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-D1zWiB_P.mjs";
|
|
2
2
|
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
|