void 1.5.0 → 1.6.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-ChVKPZ-w.mjs → account-cmd-DRhmCWcm.mjs} +3 -3
- package/dist/{application-analysis-2vGZrKzg.mjs → application-analysis-HRFsZOv3.mjs} +3 -3
- package/dist/{application-routing-DnUQoOJD.mjs → application-routing-P4TggvWp.mjs} +1 -1
- package/dist/{auth-link-D4uMdOsw.mjs → auth-link-CVXP1G6G.mjs} +3 -3
- package/dist/{auth-router-62dna450.mjs → auth-router-D1pGdbvB.mjs} +2 -2
- package/dist/{better-auth-shared-CiclgPde.mjs → better-auth-shared-C958aM7W.mjs} +28 -3
- package/dist/{build-cmd-D93K_4Sa.mjs → build-cmd-DmjbuT6d.mjs} +1 -1
- package/dist/{cache-CiIzEED4.mjs → cache-2khBO1MR.mjs} +1 -1
- package/dist/{cancel-deploy-BNoGfn2e.mjs → cancel-deploy-_itbbvY3.mjs} +1 -1
- package/dist/cli/cli.mjs +27 -27
- package/dist/client-CEtr5UOR.mjs +1 -0
- package/dist/{client-Qayy9xEh.mjs → client-CoxPEhJq.mjs} +6 -2
- package/dist/{cloudflare-cmd-DiFGaLow.mjs → cloudflare-cmd-fZ6AMSWk.mjs} +1 -1
- package/dist/{cloudflare-config-Chet188_.mjs → cloudflare-config-eQunqX6A.mjs} +1 -1
- package/dist/{cloudflare-connect-BdgAQBc7.mjs → cloudflare-connect-9OZe4XVQ.mjs} +1 -1
- package/dist/{cloudflare-operations-CWA24vCh.mjs → cloudflare-operations-CrskD4_O.mjs} +4 -4
- package/dist/{cloudflare-operations-D8MoezuN.mjs → cloudflare-operations-oLvAd9Nd.mjs} +1 -1
- package/dist/{config-Bt4rw93x.mjs → config-BBlVXZCU.mjs} +1 -1
- package/dist/{config-DkA9jYF2.mjs → config-BITKQ3O6.mjs} +2 -1
- package/dist/{config-BszFVhpk.mjs → config-BgysUhnm.mjs} +1 -1
- package/dist/{config-CzsNzGVH.d.mts → config-CPxJmt4M.d.mts} +2 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-b9mJbb6X.mjs → connect-CKvmkl2R.mjs} +4 -4
- package/dist/{create-project-rnjum4_V.mjs → create-project-BiMmR5wA.mjs} +1 -1
- package/dist/{create-project-eomwm0wa.mjs → create-project-Bq0M8MtO.mjs} +1 -1
- package/dist/{db-UPWmiSk1.mjs → db-cq5RW4Vy.mjs} +17 -17
- package/dist/{delete-BeeYi1WO.mjs → delete-CY4L8fi2.mjs} +1 -1
- package/dist/deploy-B029oHlE.mjs +2 -0
- package/dist/{deploy-CwmCcTlq.mjs → deploy-D_gEojD2.mjs} +79 -42
- package/dist/{deploy-managed-static-gPDxyp3v.mjs → deploy-managed-static-BHVbB_-A.mjs} +11 -11
- package/dist/{deploy-transport-L6zzPE9T.mjs → deploy-transport-DEyOUfac.mjs} +2 -2
- package/dist/deploy.mjs +5 -4
- package/dist/{dev-inbox-CwH5VuZj.mjs → dev-inbox-CUUS6iUg.mjs} +1 -1
- package/dist/{dispatch-CiJ1Xrba.mjs → dispatch-BNLB5_Gm.mjs} +1 -1
- package/dist/{domain-3xdH9p2L.mjs → domain-BlH90Ods.mjs} +2 -2
- package/dist/{email-Du3YRnM5.mjs → email-Bkq8ZL1p.mjs} +6 -6
- package/dist/{email-cloudflare-CtD8qE13.mjs → email-cloudflare-MvJIxrwx.mjs} +5 -107
- package/dist/{env-Cnvp0pGy.mjs → env-AvuCSeCH.mjs} +2 -2
- package/dist/{gen-BvVmpZ5f.mjs → gen-BD-dfjxY.mjs} +3 -3
- package/dist/gen-CIHXh9I8.mjs +1 -0
- package/dist/{github-cmd-X2GKiLi-.mjs → github-cmd-CA-lBdkn.mjs} +1 -1
- package/dist/{handler-Drm_lyrV.d.mts → handler-BR6Tvjkp.d.mts} +8 -3
- package/dist/{handler-xmzz0U38.mjs → handler-CKeTtYID.mjs} +2 -12
- package/dist/headers-CuTEdP9C.mjs +445 -0
- package/dist/{help-EWDNxST-.mjs → help-1OCFDsRr.mjs} +9 -1
- package/dist/help-Ba8Dq5-r.mjs +1 -0
- package/dist/{inbound-DSKSHDUj.d.mts → inbound-BHt4dIlL.d.mts} +16 -5
- package/dist/{inbound-DQfekMtz.mjs → inbound-CdO-qY0w.mjs} +2 -76
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +65 -37
- package/dist/{info-jW8_d3VI.mjs → info-CJxua_db.mjs} +4 -4
- package/dist/{init-jDQ5G9QC.mjs → init-B-4CluYx.mjs} +12 -11
- package/dist/{isr-config-DhBkzCdY.mjs → isr-config-Czzb4mIq.mjs} +1 -47
- package/dist/{link-DOyxX5Xs.mjs → link-DAXOT-G_.mjs} +2 -2
- package/dist/{list-C9pTYDtl.mjs → list-BYSOo9fm.mjs} +2 -2
- package/dist/{live-CDBHyYiR.d.mts → live-0xrcVpyq.d.mts} +1 -1
- package/dist/{local-d1-CKfek6Z4.mjs → local-d1-BLgsNUj9.mjs} +1 -1
- package/dist/login-BpbYeu-n.mjs +1 -0
- package/dist/{login-koQbjzPd.mjs → login-CJopTWX4.mjs} +2 -2
- package/dist/{logs-cTU5TsRW.mjs → logs-DE0weBsR.mjs} +13 -11
- package/dist/{migrate-C62pGTfr.mjs → migrate-ChHHZBTi.mjs} +3 -3
- package/dist/migrate-HdA6Kh2p.mjs +1 -0
- package/dist/{mime-DKkO7ZtA.mjs → mime-CtP6-qAF.mjs} +143 -15
- package/dist/nitro.mjs +3 -3
- package/dist/{node-BfAt2rz8.mjs → node-CZ6lGNLn.mjs} +1 -1
- package/dist/{operator-cmd-CnAvSqJ5.mjs → operator-cmd-BUqsdk2K.mjs} +28 -10
- package/dist/operator-cmd-wBYyp8iQ.mjs +1 -0
- package/dist/pages/client.d.mts +143 -11
- package/dist/pages/client.mjs +173 -12
- package/dist/pages/index.d.mts +22 -3
- package/dist/pages/index.mjs +18 -4
- package/dist/pages/islands-plugin.d.mts +46 -2
- package/dist/pages/islands-plugin.mjs +91 -5
- package/dist/pages/prefetch.d.mts +2 -2
- package/dist/pages/prefetch.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/platform-args-C7XUw9mw.mjs +1 -0
- package/dist/{platform-args-Bv9hoLEL.mjs → platform-args-Cx1M-7bq.mjs} +18 -4
- package/dist/{platform-auth-config-CLj0EvnB.mjs → platform-auth-config-K4m_LE8b.mjs} +4 -4
- package/dist/{platform-auth-protection-DQDSxVhr.mjs → platform-auth-protection-KF5Vo-1I.mjs} +2 -2
- package/dist/{platform-auth-recovery-DD3oLerq.mjs → platform-auth-recovery-BOdFrl7R.mjs} +2 -2
- package/dist/{platform-cmd-WnOmdLzR.mjs → platform-cmd-DpCHawGF.mjs} +1 -1
- package/dist/{platform-cmd-PLNLg-2N.mjs → platform-cmd-Ds3EAV5t.mjs} +5 -4
- package/dist/{platform-domain-Bnq0vg0q.mjs → platform-domain-rWJshybd.mjs} +2 -2
- package/dist/{platform-lifecycle-BQiN9HN5.mjs → platform-lifecycle-BH34I0rh.mjs} +1 -1
- package/dist/{platform-lifecycle-BCsFg1Tl.mjs → platform-lifecycle-D9RdGub1.mjs} +66 -31
- package/dist/{platform-management-nzCDwtiN.mjs → platform-management-BRefdHGD.mjs} +21 -3
- package/dist/{platform-management-CMJR8Zi-.mjs → platform-management-BfLW0Zlo.mjs} +1 -1
- package/dist/{platform-recovery-DBNoME3I.mjs → platform-recovery-DZuZGJtt.mjs} +2 -2
- package/dist/platform-runtime-logs-CdJGnk3f.mjs +68 -0
- package/dist/{platform-setup-VEcHu0Vq.mjs → platform-setup-Vw1AaUN8.mjs} +15 -2
- package/dist/{plugin-inference-DmwjC3y2.mjs → plugin-inference-CdLbxZL_.mjs} +1 -1
- package/dist/{prefetch-L93_1Jk7.mjs → prefetch-Dx2jIbtg.mjs} +19 -1
- package/dist/{prefetch-CG0K6JPd.d.mts → prefetch-NdNeubbH.d.mts} +7 -1
- package/dist/{prepare-pfl2LIMy.mjs → prepare-BJW-f1f1.mjs} +4 -4
- package/dist/{prepare-BPsfLWaW.mjs → prepare-BMGeKL16.mjs} +1 -1
- package/dist/prepare-BdxJJCMv.mjs +1 -0
- package/dist/{project-cmd-5Izu4Pg3.mjs → project-cmd-B_bUyZ3J.mjs} +15 -15
- package/dist/{project-team-DSUyjZFh.mjs → project-team-MjT5K4rQ.mjs} +1 -1
- package/dist/{project-token-wj09YQSB.mjs → project-token-BKHGwY3k.mjs} +1 -1
- package/dist/{project-zero-trust-BMHf2YF0.mjs → project-zero-trust-Bzdd05-h.mjs} +1 -1
- package/dist/{protocol-0-lp9ZYx.mjs → protocol-COyySMki.mjs} +130 -107
- package/dist/{protocol-xdrl-In0.d.mts → protocol-CkwjASep.d.mts} +2 -2
- package/dist/{provision-CRiNnlfE.mjs → provision-BbCzpbXs.mjs} +1 -1
- package/dist/{provision-CxHIGBIZ.mjs → provision-DQF6Kw-6.mjs} +1 -1
- package/dist/{requests-DicgB5jU.mjs → requests-daJmVpjk.mjs} +1 -1
- package/dist/{rollback-DrDZOKNE.mjs → rollback-BgL0wY1J.mjs} +2 -2
- package/dist/{route-types-irZc1txT.mjs → route-types-CZc1YXjF.mjs} +40 -4
- package/dist/route-url-C_YIH_zO.d.mts +37 -0
- package/dist/routes-stub.d.mts +6 -2
- 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/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +3 -3
- package/dist/runtime/email.d.mts +1 -1
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/route-url.d.mts +2 -2
- package/dist/runtime/routing.d.mts +3 -3
- package/dist/runtime/routing.mjs +37 -16
- 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-DSQtH3oS.mjs → scan-X2rDDRNa.mjs} +18 -10
- package/dist/{secret-C_QtTzJG.mjs → secret-CPq-B_vp.mjs} +2 -2
- package/dist/{static-asset-marker-NR1XS2z5.mjs → static-asset-marker-DsQKz6lt.mjs} +8 -1
- package/dist/validation-error-uAAjlsiW.mjs +82 -0
- package/dist/{version-metadata-Blf5H9BQ.mjs → version-metadata-C8hLzQkv.mjs} +1 -1
- package/dist/{wrangler-p-kLCJqF.mjs → wrangler-DESSbN8L.mjs} +2 -2
- package/dist/wrangler-DUB3MGHV.mjs +1 -0
- package/dist/{wrapper-iejSJDwL.mjs → wrapper-C9SUxoj7.mjs} +2 -2
- package/dist/{ws-DzBD-NUj.d.mts → ws-Dmjg5NH2.d.mts} +1 -1
- package/docs/guide/edge/headers.md +2 -0
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/email/receiving.md +1 -1
- package/docs/guide/email/sending.md +42 -12
- package/docs/guide/pages-routing/actions-and-forms.md +21 -1
- package/docs/guide/pages-routing/islands.md +3 -3
- package/docs/guide/pages-routing/layouts.md +16 -2
- package/docs/guide/pages-routing/loaders.md +2 -2
- package/docs/guide/pages-routing/markdown.md +1 -1
- package/docs/guide/pages-routing/overview.md +103 -0
- package/docs/guide/platform/administration/connected-apps.md +4 -2
- package/docs/guide/platform/installation/credentials.md +6 -4
- package/docs/guide/platform/installation/maintenance.md +13 -0
- package/docs/guide/platform/installation/setup.md +22 -1
- package/docs/guide/ssg.md +3 -3
- package/docs/guide/type-safety.md +42 -1
- package/docs/integrations/frameworks/astro.md +17 -12
- package/docs/integrations/frameworks/overview.md +2 -2
- package/docs/reference/api/pages.md +101 -50
- package/docs/reference/api/rewrites.md +4 -1
- package/docs/reference/api/types.md +14 -10
- package/docs/reference/api.md +1 -1
- package/docs/reference/cli/platform-installation.md +4 -1
- package/docs/reference/cli/setup.md +1 -1
- package/docs/reference/config.md +10 -0
- package/package.json +8 -7
- package/schema.json +4 -0
- package/skills/void/SKILL.md +5 -0
- package/dist/client-DVtAKeUm.mjs +0 -1
- package/dist/deploy-CfU7CR-b.mjs +0 -2
- package/dist/gen-i61rdQgg.mjs +0 -1
- package/dist/headers-DEUBAM6W.mjs +0 -225
- package/dist/help-BcZDUcTw.mjs +0 -1
- package/dist/login-C0MiQrYs.mjs +0 -1
- package/dist/migrate-BG09-KOv.mjs +0 -1
- package/dist/operator-cmd-BhHXIL2G.mjs +0 -1
- package/dist/platform-args-C1kqYUen.mjs +0 -1
- package/dist/prepare-BJMmfq3W.mjs +0 -1
- package/dist/route-url-BGOiyKNz.d.mts +0 -24
- package/dist/validation-error-rDVbUJet.mjs +0 -47
- package/dist/wrangler-CPRX2d9A.mjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as getToken, f as removeToken } from "./auth-Dy8svcqQ.mjs";
|
|
2
2
|
import { L as log } from "./dist-D23AAMxT.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
3
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
4
4
|
import { m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
5
|
-
import { n as runLoginCommand } from "./login-
|
|
5
|
+
import { n as runLoginCommand } from "./login-CJopTWX4.mjs";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
// src/cli/account-cmd.ts
|
|
8
8
|
async function runAccountCommand(root, args) {
|
|
9
9
|
switch (args.subcommand) {
|
|
10
10
|
case "login": return runLoginCommand(root);
|
|
11
|
-
case "link": return import("./auth-link-
|
|
11
|
+
case "link": return import("./auth-link-CVXP1G6G.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
12
12
|
case "logout":
|
|
13
13
|
if (removeToken(root)) printSuccess("Logged out.");
|
|
14
14
|
else log.info("Not logged in.");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { c as scanWebSocketRoutesSync, d as readResourceDefinition, f as listConventionFiles, h as needsApplicationDatabase, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as listRouteFiles, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-
|
|
2
|
+
import { c as scanWebSocketRoutesSync, d as readResourceDefinition, f as listConventionFiles, h as needsApplicationDatabase, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as listRouteFiles, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-CdLbxZL_.mjs";
|
|
3
3
|
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-CdGv9Tmi.mjs";
|
|
4
4
|
import { r as findVoidAuthConfig } from "./config-WlvEcL82.mjs";
|
|
5
|
-
import { l as getDatabaseDialect, m as resolveBindingNames } from "./config-
|
|
5
|
+
import { l as getDatabaseDialect, m as resolveBindingNames } from "./config-BITKQ3O6.mjs";
|
|
6
6
|
import { n as globSync } from "./dist-BWNkVq50.mjs";
|
|
7
|
-
import { m as parseRouteFilename, n as scanPages, p as isRouteEnabledForEnvironment } from "./scan-
|
|
7
|
+
import { m as parseRouteFilename, n as scanPages, p as isRouteEnabledForEnvironment } from "./scan-X2rDDRNa.mjs";
|
|
8
8
|
import { n as isIdentifier, o as moduleExportName } from "./ast-Cv0JwXqb.mjs";
|
|
9
9
|
import { a as staticLiteral, i as staticExportInitializers, o as unwrapStaticExpression, t as bindingNames } from "./ast-bindings-BkivMJIo.mjs";
|
|
10
10
|
import { n as resourceNameWords } from "./resource-name-DlJ9QXzg.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-
|
|
1
|
+
import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-HRFsZOv3.mjs";
|
|
2
2
|
// src/application-routing.ts
|
|
3
3
|
/** Complete route/page analysis using the same resource and handler inventories. */
|
|
4
4
|
async function completeApplicationAnalysis(analysis) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-Dy8svcqQ.mjs";
|
|
2
2
|
import { L as log } from "./dist-D23AAMxT.mjs";
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
3
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
4
4
|
import { l as formatUrl } from "./output-BCdLioKP.mjs";
|
|
5
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
6
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
5
|
+
import { r as selectPlatformLoginMethod } from "./login-CJopTWX4.mjs";
|
|
6
|
+
import { t as discoverPlatform } from "./platform-cmd-Ds3EAV5t.mjs";
|
|
7
7
|
// src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -39,11 +39,11 @@ async function chooseDestination(root, args, interactive) {
|
|
|
39
39
|
async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
|
|
40
40
|
const destination = await chooseDestination(root, args, interactive);
|
|
41
41
|
if (destination.platform === "cloudflare") {
|
|
42
|
-
const { runCloudflareCommand } = await import("./cloudflare-cmd-
|
|
42
|
+
const { runCloudflareCommand } = await import("./cloudflare-cmd-fZ6AMSWk.mjs");
|
|
43
43
|
await runCloudflareCommand(root, { subcommand: args.subcommand });
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
46
|
+
const { runAccountCommand } = await import("./account-cmd-DRhmCWcm.mjs");
|
|
47
47
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
48
48
|
if (!destination.apiUrl) {
|
|
49
49
|
await runAccountCommand(root, { subcommand });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as getVoidAuthProviderSettingEnvNames, o as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-ZARwX2cL.mjs";
|
|
2
|
-
import { t as isUnchangedStaticAsset } from "./static-asset-marker-
|
|
2
|
+
import { i as authDependentRequests, r as SHARED_CACHE_HEADERS, t as isUnchangedStaticAsset } from "./static-asset-marker-DsQKz6lt.mjs";
|
|
3
3
|
import { t as authContext } from "./auth-YVjBX5NY.mjs";
|
|
4
4
|
import { randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import { betterAuth } from "better-auth";
|
|
@@ -111,7 +111,10 @@ function appendAuthHeaders(c, source, includeCachePolicy, staticAsset) {
|
|
|
111
111
|
source.forEach((value, key) => {
|
|
112
112
|
if (!["cache-control", "pragma"].includes(key.toLowerCase())) c.header(key, value, { append: key.toLowerCase() === "set-cookie" });
|
|
113
113
|
});
|
|
114
|
-
if (includeCachePolicy)
|
|
114
|
+
if (includeCachePolicy) {
|
|
115
|
+
c.header("Cache-Control", source.has("set-cookie") ? "private, no-store" : privateCachePolicy(c.res.headers.get("cache-control")));
|
|
116
|
+
dropSharedCachePolicy(c);
|
|
117
|
+
}
|
|
115
118
|
return;
|
|
116
119
|
}
|
|
117
120
|
const routeDirectives = bareCacheDirectives(c.res.headers.get("cache-control"));
|
|
@@ -126,6 +129,10 @@ function appendAuthHeaders(c, source, includeCachePolicy, staticAsset) {
|
|
|
126
129
|
"no-store",
|
|
127
130
|
"no-cache"
|
|
128
131
|
].some((directive) => sessionDirectives.has(directive))) c.header("Cache-Control", "private, no-store");
|
|
132
|
+
if (includeCachePolicy || source.has("set-cookie")) dropSharedCachePolicy(c);
|
|
133
|
+
}
|
|
134
|
+
function dropSharedCachePolicy(c) {
|
|
135
|
+
for (const name of SHARED_CACHE_HEADERS) if (c.res.headers.has(name)) c.header(name, void 0);
|
|
129
136
|
}
|
|
130
137
|
function bareCacheDirectives(policy) {
|
|
131
138
|
const directives = (policy ?? "").match(/(?:[^",]|"(?:[^"\\]|\\.)*"?)+/g) ?? [];
|
|
@@ -136,6 +143,22 @@ function bareCacheDirectives(policy) {
|
|
|
136
143
|
* `s-maxage` and a field-scoped `private` give way to a leading `private`.
|
|
137
144
|
* A policy that is already private or no-store stays as it is.
|
|
138
145
|
*/
|
|
146
|
+
/**
|
|
147
|
+
* True when the response sets a Better Auth cookie, such as the session from a
|
|
148
|
+
* sign-in reached through a rewrite or fallback. A cookie the app sets itself
|
|
149
|
+
* keeps the route's own cache policy.
|
|
150
|
+
*/
|
|
151
|
+
function setsAuthCookie(headers, advanced) {
|
|
152
|
+
const prefix = `${advanced?.cookiePrefix || "better-auth"}.`;
|
|
153
|
+
const custom = /* @__PURE__ */ new Set();
|
|
154
|
+
for (const cookie of Object.values(advanced?.cookies ?? {})) if (cookie?.name) custom.add(cookie.name);
|
|
155
|
+
return headers.getSetCookie().some((value) => {
|
|
156
|
+
const equals = value.indexOf("=");
|
|
157
|
+
let name = (equals === -1 ? value : value.slice(0, equals)).trim();
|
|
158
|
+
for (const secure of ["__Secure-", "__Host-"]) if (name.startsWith(secure)) name = name.slice(secure.length);
|
|
159
|
+
return name.startsWith(prefix) || custom.has(name);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
139
162
|
function privateCachePolicy(policy) {
|
|
140
163
|
const directives = splitCacheDirectives(policy ?? "");
|
|
141
164
|
if (directives.length === 0) return "private, no-store";
|
|
@@ -317,6 +340,8 @@ function createVoidAuthRuntime(dialect, applyMigrations) {
|
|
|
317
340
|
const state = result.response ?? null;
|
|
318
341
|
c.set("user", state?.user ?? null);
|
|
319
342
|
c.set("session", state?.session ?? null);
|
|
343
|
+
const authEndpoint = c.req.path === "/api/auth" || c.req.path.startsWith("/api/auth/");
|
|
344
|
+
if (authEndpoint) authDependentRequests.add(c.req.raw);
|
|
320
345
|
await authContext.run({
|
|
321
346
|
user: state?.user ?? null,
|
|
322
347
|
state
|
|
@@ -328,7 +353,7 @@ function createVoidAuthRuntime(dialect, applyMigrations) {
|
|
|
328
353
|
"authorization",
|
|
329
354
|
"cf-access-jwt-assertion"
|
|
330
355
|
].some((header) => c.req.raw.headers.has(header));
|
|
331
|
-
appendAuthHeaders(c, result.headers, state !== null || credentialed || result.headers?.has("set-cookie") === true, isUnchangedStaticAsset(c));
|
|
356
|
+
appendAuthHeaders(c, result.headers, state !== null || credentialed || result.headers?.has("set-cookie") === true || setsAuthCookie(c.res.headers, auth.options.advanced) || authEndpoint, isUnchangedStaticAsset(c));
|
|
332
357
|
}
|
|
333
358
|
async function handleVoidAuthRequest(c, runtime, database) {
|
|
334
359
|
const existingAuth = c.get("__voidAuth");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { n as PlatformApiError, r as PlatformClient } from "./client-
|
|
4
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { f as import_picocolors, i as dim, m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
6
6
|
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
7
7
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { m as printSuccess, o as formatCount, r as createSpinner } from "./output-BCdLioKP.mjs";
|
|
6
6
|
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
7
7
|
// src/cli/cache.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { A as confirm, H as outro, L as log, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
6
6
|
// src/cli/cancel-deploy.ts
|
|
7
7
|
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-zEwu
|
|
|
4
4
|
import { n as getOwnVersion } from "../agents-DRo8gzni.mjs";
|
|
5
5
|
import { f as import_picocolors, l as formatUrl } from "../output-BCdLioKP.mjs";
|
|
6
6
|
import { n as isD1Bookmark } from "../cf-command-values-Ccl-zRhl.mjs";
|
|
7
|
-
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-
|
|
7
|
+
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-1OCFDsRr.mjs";
|
|
8
8
|
import { r as OperatorClientError } from "../operator-client-BIY4-N_6.mjs";
|
|
9
9
|
import { n as operatorGroups } from "../operator-args-D79WQP70.mjs";
|
|
10
|
-
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-
|
|
10
|
+
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-Cx1M-7bq.mjs";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
12
12
|
// src/cli/account-args.ts
|
|
13
13
|
const accountSubcommands = [
|
|
@@ -1632,19 +1632,19 @@ const args = process.argv.slice(2);
|
|
|
1632
1632
|
const command = args[0];
|
|
1633
1633
|
const helpPath = getHelpPath(args);
|
|
1634
1634
|
const subcommandGroups = {
|
|
1635
|
-
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-
|
|
1636
|
-
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-
|
|
1637
|
-
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
1638
|
-
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
1639
|
-
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1640
|
-
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1641
|
-
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1642
|
-
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
1643
|
-
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1644
|
-
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1645
|
-
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1646
|
-
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
1647
|
-
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1635
|
+
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-D1pGdbvB.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
|
|
1636
|
+
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-DRhmCWcm.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
|
|
1637
|
+
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-DpCHawGF.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
|
|
1638
|
+
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-fZ6AMSWk.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
|
|
1639
|
+
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-B_bUyZ3J.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
|
|
1640
|
+
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-CPq-B_vp.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
|
|
1641
|
+
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-BlH90Ods.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
|
|
1642
|
+
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-Bkq8ZL1p.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
|
|
1643
|
+
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-cq5RW4Vy.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
|
|
1644
|
+
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-AvuCSeCH.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
|
|
1645
|
+
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-CIHXh9I8.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
|
|
1646
|
+
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-CA-lBdkn.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
|
|
1647
|
+
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-DmjbuT6d.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
|
|
1648
1648
|
};
|
|
1649
1649
|
if (helpPath) {
|
|
1650
1650
|
if (helpPath.length === 0) printGlobalHelp();
|
|
@@ -1663,7 +1663,7 @@ if (helpPath) {
|
|
|
1663
1663
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1664
1664
|
process.exit(1);
|
|
1665
1665
|
}
|
|
1666
|
-
import("../deploy-
|
|
1666
|
+
import("../deploy-B029oHlE.mjs").then(({ runDeploy }) => {
|
|
1667
1667
|
runDeploy(root, deployArgs).catch((err) => {
|
|
1668
1668
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1669
1669
|
process.exit(1);
|
|
@@ -1671,14 +1671,14 @@ if (helpPath) {
|
|
|
1671
1671
|
});
|
|
1672
1672
|
} else if (command === "connect") (async () => {
|
|
1673
1673
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1674
|
-
const { runConnectCommand } = await import("../connect-
|
|
1674
|
+
const { runConnectCommand } = await import("../connect-CKvmkl2R.mjs");
|
|
1675
1675
|
await runConnectCommand(process.cwd(), parsed);
|
|
1676
1676
|
})().catch((err) => {
|
|
1677
1677
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1678
1678
|
process.exit(1);
|
|
1679
1679
|
});
|
|
1680
1680
|
else if (command && Object.hasOwn(subcommandGroups, command)) subcommandGroups[command]();
|
|
1681
|
-
else if (command === "info") import("../info-
|
|
1681
|
+
else if (command === "info") import("../info-CJxua_db.mjs").then(async ({ runInfoCommand }) => {
|
|
1682
1682
|
try {
|
|
1683
1683
|
await runInfoCommand(process.cwd(), parseInfoArgs(args.slice(1)));
|
|
1684
1684
|
} catch (err) {
|
|
@@ -1699,7 +1699,7 @@ else if (command === "prepare") {
|
|
|
1699
1699
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1700
1700
|
process.exit(1);
|
|
1701
1701
|
}
|
|
1702
|
-
import("../prepare-
|
|
1702
|
+
import("../prepare-BMGeKL16.mjs").then(({ runPrepareCommand }) => {
|
|
1703
1703
|
runPrepareCommand(root).catch((err) => {
|
|
1704
1704
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1705
1705
|
process.exit(1);
|
|
@@ -1707,7 +1707,7 @@ else if (command === "prepare") {
|
|
|
1707
1707
|
});
|
|
1708
1708
|
} else if (command === "init") {
|
|
1709
1709
|
const root = process.cwd();
|
|
1710
|
-
import("../init-
|
|
1710
|
+
import("../init-B-4CluYx.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1711
1711
|
let initArgs;
|
|
1712
1712
|
try {
|
|
1713
1713
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1725,7 +1725,7 @@ else if (command === "prepare") {
|
|
|
1725
1725
|
log.error("migrate: This command takes no arguments.");
|
|
1726
1726
|
process.exit(1);
|
|
1727
1727
|
}
|
|
1728
|
-
import("../migrate-
|
|
1728
|
+
import("../migrate-HdA6Kh2p.mjs").then(({ runMigrateCommand }) => {
|
|
1729
1729
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1730
1730
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1731
1731
|
process.exit(1);
|
|
@@ -1847,32 +1847,32 @@ else if (command) {
|
|
|
1847
1847
|
if (Object.hasOwn(subcommandGroups, cmd)) return subcommandGroups[cmd]();
|
|
1848
1848
|
switch (cmd) {
|
|
1849
1849
|
case "connect": {
|
|
1850
|
-
const { runConnectCommand } = await import("../connect-
|
|
1850
|
+
const { runConnectCommand } = await import("../connect-CKvmkl2R.mjs");
|
|
1851
1851
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1852
1852
|
return;
|
|
1853
1853
|
}
|
|
1854
1854
|
case "init": {
|
|
1855
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1855
|
+
const { runInitCommand, parseInitArgs } = await import("../init-B-4CluYx.mjs");
|
|
1856
1856
|
await runInitCommand(root, parseInitArgs([]));
|
|
1857
1857
|
return;
|
|
1858
1858
|
}
|
|
1859
1859
|
case "migrate": {
|
|
1860
|
-
const { runMigrateCommand } = await import("../migrate-
|
|
1860
|
+
const { runMigrateCommand } = await import("../migrate-HdA6Kh2p.mjs");
|
|
1861
1861
|
await runMigrateCommand(root);
|
|
1862
1862
|
return;
|
|
1863
1863
|
}
|
|
1864
1864
|
case "deploy": {
|
|
1865
|
-
const { runDeploy } = await import("../deploy-
|
|
1865
|
+
const { runDeploy } = await import("../deploy-B029oHlE.mjs");
|
|
1866
1866
|
await runDeploy(root);
|
|
1867
1867
|
return;
|
|
1868
1868
|
}
|
|
1869
1869
|
case "info": {
|
|
1870
|
-
const { runInfoCommand } = await import("../info-
|
|
1870
|
+
const { runInfoCommand } = await import("../info-CJxua_db.mjs");
|
|
1871
1871
|
await runInfoCommand(root, parseInfoArgs([]));
|
|
1872
1872
|
return;
|
|
1873
1873
|
}
|
|
1874
1874
|
case "prepare": {
|
|
1875
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1875
|
+
const { runPrepareCommand } = await import("../prepare-BMGeKL16.mjs");
|
|
1876
1876
|
await runPrepareCommand(root);
|
|
1877
1877
|
return;
|
|
1878
1878
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
@@ -94,7 +94,7 @@ function readCliVersion() {
|
|
|
94
94
|
}
|
|
95
95
|
const VOID_CLI_VERSION = readCliVersion();
|
|
96
96
|
/** The oldest Void platform release this CLI supports. */
|
|
97
|
-
const MIN_PLATFORM_VERSION = "1.
|
|
97
|
+
const MIN_PLATFORM_VERSION = "1.6.0";
|
|
98
98
|
const RELEASE_VERSION = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
|
|
99
99
|
/**
|
|
100
100
|
* Discovery probes keyed by platform base URL. Every outcome (pass,
|
|
@@ -882,7 +882,11 @@ var PlatformClient = class {
|
|
|
882
882
|
});
|
|
883
883
|
if (deploymentId) params.set("deploymentId", deploymentId);
|
|
884
884
|
if (level && level !== "all") params.set("level", level);
|
|
885
|
-
|
|
885
|
+
const json = await this.json(`${this.baseUrl}/projects/${projectId}/logs?${params}`, "Failed to fetch logs", { permission: "read" });
|
|
886
|
+
return {
|
|
887
|
+
entries: json.data,
|
|
888
|
+
...json.runtimeLogs === "minimal" ? { runtimeLogs: "minimal" } : {}
|
|
889
|
+
};
|
|
886
890
|
}
|
|
887
891
|
async getRequests(projectId, since, limit = 200, status) {
|
|
888
892
|
const params = new URLSearchParams({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { b as readRootWranglerConfig } from "./wrangler-
|
|
2
|
+
import { b as readRootWranglerConfig } from "./wrangler-DESSbN8L.mjs";
|
|
3
3
|
import { L as log } from "./dist-D23AAMxT.mjs";
|
|
4
4
|
import { m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
5
5
|
import { i as isCleanCloudflareExit } from "./cloudflare-process-DjJ638A-.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import "./project-paths-CdGv9Tmi.mjs";
|
|
3
|
-
import { p as readConfig } from "./config-
|
|
3
|
+
import { p as readConfig } from "./config-BITKQ3O6.mjs";
|
|
4
4
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
5
5
|
import { t as parseJsoncObject } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
6
6
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { M as writeProvisionedWranglerConfig, b as readRootWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-
|
|
2
|
+
import { M as writeProvisionedWranglerConfig, b as readRootWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-DESSbN8L.mjs";
|
|
3
3
|
import { K as select, L as log, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
4
4
|
import { i as ensureCloudflareAuthentication, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-CEu-1Ps_.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { a as persistCloudflareConfig, i as materializeCloudflareConfig } from "./cloudflare-config-
|
|
3
|
-
import { N as writeWranglerPublishedTrafficSnapshot, S as readWranglerCustomDomains, j as updateWranglerCustomDomain, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-
|
|
2
|
+
import { a as persistCloudflareConfig, i as materializeCloudflareConfig } from "./cloudflare-config-eQunqX6A.mjs";
|
|
3
|
+
import { N as writeWranglerPublishedTrafficSnapshot, S as readWranglerCustomDomains, j as updateWranglerCustomDomain, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-DESSbN8L.mjs";
|
|
4
4
|
import { u as getErrorMessage } from "./output-BCdLioKP.mjs";
|
|
5
5
|
import { t as createCloudflareProcessRunner } from "./cloudflare-process-DjJ638A-.mjs";
|
|
6
|
-
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-
|
|
7
|
-
import { a as findWranglerCiOverrideDotenvFile, i as findAmbientConfigOverride } from "./deploy-transport-
|
|
6
|
+
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-BbCzpbXs.mjs";
|
|
7
|
+
import { a as findWranglerCiOverrideDotenvFile, i as findAmbientConfigOverride } from "./deploy-transport-DEyOUfac.mjs";
|
|
8
8
|
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { tmpdir } from "node:os";
|
|
10
10
|
import { deployCloudflareVersionTraffic, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, parseRootWranglerConfig, readBindingFieldPresence, readCloudflareTriggerConfig, readWranglerTopLevelString, resolveD1MigrateTarget, stabilizeCloudflareVersionTriggers } from "@void/deploy-cloudflare";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as activateCloudflareExistingVersion, n as applyCloudflareD1Migrations, r as changeCloudflareDomain, o as deleteCloudflareSecret, s as executeCloudflareD1Sql, c as listCloudflareDomains, l as listCloudflareSecrets, m as putCloudflareSecret, h as readCloudflareD1Migrations, g as readCloudflareWorkerStatus, _ as resolveCloudflareD1Context, v as resolveCloudflareOperationContext, y as restoreCloudflareD1Database, b as syncCloudflareSecrets, x as tailCloudflareWorker } from "./cloudflare-operations-
|
|
1
|
+
export { t as activateCloudflareExistingVersion, n as applyCloudflareD1Migrations, r as changeCloudflareDomain, o as deleteCloudflareSecret, s as executeCloudflareD1Sql, c as listCloudflareDomains, l as listCloudflareSecrets, m as putCloudflareSecret, h as readCloudflareD1Migrations, g as readCloudflareWorkerStatus, _ as resolveCloudflareD1Context, v as resolveCloudflareOperationContext, y as restoreCloudflareD1Database, b as syncCloudflareSecrets, x as tailCloudflareWorker } from "./cloudflare-operations-CrskD4_O.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { i as resolveProjectPaths } from "./project-paths-CdGv9Tmi.mjs";
|
|
3
3
|
import { n as schemaSpecifier, t as discoverSchema } from "./discover-Dhkzxgdt.mjs";
|
|
4
|
-
import { c as getDatabaseCasing, p as readConfig } from "./config-
|
|
4
|
+
import { c as getDatabaseCasing, p as readConfig } from "./config-BITKQ3O6.mjs";
|
|
5
5
|
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { tmpdir } from "node:os";
|
|
7
7
|
// src/drizzle/config.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-CdGv9Tmi.mjs";
|
|
2
2
|
import { a as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-ZARwX2cL.mjs";
|
|
3
|
-
import { n as MimeError,
|
|
3
|
+
import { n as MimeError, o as parseAddress } from "./mime-CtP6-qAF.mjs";
|
|
4
4
|
import { isRecord } from "@void/deploy-core";
|
|
5
5
|
// src/config.ts
|
|
6
6
|
const CONFIG_FILE = "void.json";
|
|
@@ -241,6 +241,7 @@ function validateConfigObject(obj) {
|
|
|
241
241
|
const routing = obj.routing;
|
|
242
242
|
if (routing.alwaysUseHttps !== void 0 && typeof routing.alwaysUseHttps !== "boolean") throw new Error(`config: "routing.alwaysUseHttps" in ${CONFIG_FILE} must be a boolean.`);
|
|
243
243
|
if (routing.alwaysUseHttps === true && isNodeTarget(obj.target)) throw new Error(`config: "routing.alwaysUseHttps" in ${CONFIG_FILE} requires target: "cloudflare". It is not available with target: "${obj.target}".`);
|
|
244
|
+
if (routing.typedRoutes !== void 0 && typeof routing.typedRoutes !== "boolean") throw new Error(`config: "routing.typedRoutes" in ${CONFIG_FILE} must be a boolean.`);
|
|
244
245
|
if (routing.notFound !== void 0) {
|
|
245
246
|
if (typeof routing.notFound !== "string" || !VALID_NOT_FOUND_HANDLING.has(routing.notFound)) throw new Error(`config: "routing.notFound" in ${CONFIG_FILE} must be one of: ${[...VALID_NOT_FOUND_HANDLING].join(", ")}.`);
|
|
246
247
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as PLACEHOLDER_DB_URL, n as withPrivateDrizzleConfig, r as writeDrizzleConfig } from "./config-
|
|
1
|
+
export { t as PLACEHOLDER_DB_URL, n as withPrivateDrizzleConfig, r as writeDrizzleConfig } from "./config-BBlVXZCU.mjs";
|
|
@@ -47,6 +47,8 @@ type RoutingConfig = {
|
|
|
47
47
|
alwaysUseHttps?: boolean;
|
|
48
48
|
/** Disable ISR and edge prerendering, including per-page policies. Static output is unaffected. */
|
|
49
49
|
isr?: boolean;
|
|
50
|
+
/** Type-check URL strings in links, navigation, and rewrites against the app's routes. Omitted means off. */
|
|
51
|
+
typedRoutes?: boolean;
|
|
50
52
|
revalidate?: number | Record<string, number>;
|
|
51
53
|
revalidateQueryAllowlist?: Record<string, Array<string>>;
|
|
52
54
|
prerender?: Array<string>;
|
package/dist/config-entry.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VoidConfig } from "./config-
|
|
1
|
+
import { t as VoidConfig } from "./config-CPxJmt4M.mjs";
|
|
2
2
|
/** Define a typed Void project configuration without loading the Vite plugin. */
|
|
3
3
|
export declare function defineConfig<const T extends VoidConfig>(config: T): T;
|
|
4
4
|
export type { VoidConfig };
|
|
@@ -2,11 +2,11 @@ import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./pl
|
|
|
2
2
|
import { c as writeDeploymentPlatform, l as writePlatformSelection, n as readDeploymentPlatform } from "./project-CLwxcEdq.mjs";
|
|
3
3
|
import { d as readPlatformToken } from "./auth-Dy8svcqQ.mjs";
|
|
4
4
|
import { K as select, L as log, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
5
|
-
import { a as isExpiredTokenError, r as PlatformClient } from "./client-
|
|
5
|
+
import { a as isExpiredTokenError, r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
6
6
|
import { m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
7
|
-
import { t as promptForLoginToken } from "./login-
|
|
8
|
-
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-
|
|
9
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
7
|
+
import { t as promptForLoginToken } from "./login-CJopTWX4.mjs";
|
|
8
|
+
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-Ds3EAV5t.mjs";
|
|
9
|
+
import { t as connectCloudflare } from "./cloudflare-connect-9OZe4XVQ.mjs";
|
|
10
10
|
// src/cli/connect.ts
|
|
11
11
|
async function selectVoidPlatform(interactive) {
|
|
12
12
|
if (!interactive) throw new Error("connect: Supply a Void platform URL in non-interactive mode.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createProjectWithSlugRetry } from "./create-project-
|
|
1
|
+
export { t as createProjectWithSlugRetry } from "./create-project-Bq0M8MtO.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as attachSelectedPlatform, u as writeProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { s as getSiteDomain } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { n as PlatformApiError } from "./client-
|
|
4
|
+
import { n as PlatformApiError } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { f as import_picocolors, h as sanitizeTerminalText } from "./output-BCdLioKP.mjs";
|
|
6
6
|
import { t as validateProjectSlug } from "./project-slug-CO6ci9XG.mjs";
|
|
7
7
|
import { n as inferDefaultSlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { a as join, c as resolve, n as dirname, r as extname, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
2
|
+
import { r as detectFramework } from "./plugin-inference-CdLbxZL_.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-CdGv9Tmi.mjs";
|
|
4
|
-
import { c as getDatabaseCasing, l as getDatabaseDialect, m as resolveBindingNames, p as readConfig } from "./config-
|
|
4
|
+
import { c as getDatabaseCasing, l as getDatabaseDialect, m as resolveBindingNames, p as readConfig } from "./config-BITKQ3O6.mjs";
|
|
5
5
|
import { i as writeJournal, n as readJournal, r as stripSqlExt, t as collectMigrations } from "./collect-C6Blu9yw.mjs";
|
|
6
6
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
7
|
-
import { t as resolveLocalD1Target } from "./local-d1-
|
|
7
|
+
import { t as resolveLocalD1Target } from "./local-d1-BLgsNUj9.mjs";
|
|
8
8
|
import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
|
|
9
9
|
import { n as ensurePlatformProxyAccess, r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-BmBT2h8_.mjs";
|
|
10
10
|
import { c as getToken, o as getProxyUrl } from "./auth-Dy8svcqQ.mjs";
|
|
11
11
|
import { s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
|
|
12
12
|
import { i as validateMigrations, t as assertJournalCoherence } from "./validate-Ddzl-IwT.mjs";
|
|
13
13
|
import { A as confirm, H as outro, L as log, X as text, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
14
|
-
import { n as PlatformApiError, r as PlatformClient } from "./client-
|
|
14
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
15
15
|
import { f as import_picocolors, i as dim, l as formatUrl, m as printSuccess, o as formatCount, u as getErrorMessage } from "./output-BCdLioKP.mjs";
|
|
16
16
|
import { n as drizzleKitBin } from "./yarn-pnp-DgWbE7z5.mjs";
|
|
17
|
-
import { n as formatTimestamp } from "./gen-
|
|
17
|
+
import { n as formatTimestamp } from "./gen-BD-dfjxY.mjs";
|
|
18
18
|
import { createRequire } from "node:module";
|
|
19
19
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
20
20
|
import { pathToFileURL } from "node:url";
|
|
@@ -155,7 +155,7 @@ function runDrizzleKit(root, args) {
|
|
|
155
155
|
* already printed its own error.
|
|
156
156
|
*/
|
|
157
157
|
async function runDrizzleKitWithDatabaseUrl(root, url, dialect, command) {
|
|
158
|
-
const { withPrivateDrizzleConfig } = await import("./config-
|
|
158
|
+
const { withPrivateDrizzleConfig } = await import("./config-BgysUhnm.mjs");
|
|
159
159
|
if (!withPrivateDrizzleConfig(root, url, dialect, (configPath) => {
|
|
160
160
|
try {
|
|
161
161
|
runDrizzleKit(root, [
|
|
@@ -311,7 +311,7 @@ async function runPush(root, dialect) {
|
|
|
311
311
|
printSuccess("Database schema pushed.");
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
314
|
+
const { writeDrizzleConfig } = await import("./config-BgysUhnm.mjs");
|
|
315
315
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
316
316
|
mkdirSync(dirname(dbPath), { recursive: true });
|
|
317
317
|
const configPath = writeDrizzleConfig(root, dbPath);
|
|
@@ -327,8 +327,8 @@ async function runPush(root, dialect) {
|
|
|
327
327
|
printSuccess("Database schema pushed.");
|
|
328
328
|
}
|
|
329
329
|
async function runGenerate(root, dialect) {
|
|
330
|
-
const { prepareProject } = await import("./prepare-
|
|
331
|
-
const { PLACEHOLDER_DB_URL, writeDrizzleConfig } = await import("./config-
|
|
330
|
+
const { prepareProject } = await import("./prepare-BdxJJCMv.mjs");
|
|
331
|
+
const { PLACEHOLDER_DB_URL, writeDrizzleConfig } = await import("./config-BgysUhnm.mjs");
|
|
332
332
|
await prepareProject(root);
|
|
333
333
|
const authSchemaPath = join(root, ".void", "better-auth-schema.ts");
|
|
334
334
|
const additionalSchemas = existsSync(authSchemaPath) ? [authSchemaPath] : void 0;
|
|
@@ -398,7 +398,7 @@ async function runStatus(root, dialect) {
|
|
|
398
398
|
applied_at: ""
|
|
399
399
|
}));
|
|
400
400
|
} else {
|
|
401
|
-
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
401
|
+
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-oLvAd9Nd.mjs");
|
|
402
402
|
remoteApplied = (await readCloudflareD1Migrations(resolveCloudflareD1Context(root, configuredD1Binding(root)))).map((name) => ({
|
|
403
403
|
name,
|
|
404
404
|
applied_at: ""
|
|
@@ -710,7 +710,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
710
710
|
process.exit(0);
|
|
711
711
|
}
|
|
712
712
|
if (dialect === "sqlite") {
|
|
713
|
-
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
713
|
+
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-oLvAd9Nd.mjs");
|
|
714
714
|
const rows = await executeCloudflareD1Sql(resolveCloudflareD1Context(root, configuredD1Binding(root)), sql);
|
|
715
715
|
if (rows.length > 0) printTable(rows);
|
|
716
716
|
} else {
|
|
@@ -904,7 +904,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
904
904
|
log.info(`No migration files found in ${paths.sourceRelative("db/migrations")}/`);
|
|
905
905
|
return;
|
|
906
906
|
}
|
|
907
|
-
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
907
|
+
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-oLvAd9Nd.mjs");
|
|
908
908
|
const binding = configuredD1Binding(root);
|
|
909
909
|
const context = resolveCloudflareD1Context(root, binding);
|
|
910
910
|
const remoteBefore = new Set(await readCloudflareD1Migrations(context));
|
|
@@ -924,7 +924,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
924
924
|
log.error(`db: D1 binding ${binding} has no "migrations_dir", so Cloudflare would apply ./migrations instead of ${dir}/. Add "migrations_dir": "./${dir}" to that D1 binding in your Cloudflare config, then run the command again.`);
|
|
925
925
|
process.exit(1);
|
|
926
926
|
}
|
|
927
|
-
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-
|
|
927
|
+
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-B029oHlE.mjs");
|
|
928
928
|
const applySet = await checkWranglerMigrationApplySet(context.operation.configPath, parseRootWranglerConfig(context.operation.configPath), binding, context.migrationsDir, rawMigrations, paths.sourceRelative("db/migrations"));
|
|
929
929
|
if (!applySet.ok) {
|
|
930
930
|
log.error(applySet.reason);
|
|
@@ -1051,7 +1051,7 @@ async function runRestore(root, dialect, { target, platform: explicitPlatform, y
|
|
|
1051
1051
|
log.error("db: `void db restore` restores the D1 database of a direct Cloudflare deploy. After a one-off `void deploy --platform cloudflare`, run it with `--platform cloudflare`.");
|
|
1052
1052
|
process.exit(1);
|
|
1053
1053
|
}
|
|
1054
|
-
const { readCloudflareD1Migrations, resolveCloudflareD1Context, restoreCloudflareD1Database } = await import("./cloudflare-operations-
|
|
1054
|
+
const { readCloudflareD1Migrations, resolveCloudflareD1Context, restoreCloudflareD1Database } = await import("./cloudflare-operations-oLvAd9Nd.mjs");
|
|
1055
1055
|
const binding = configuredD1Binding(root);
|
|
1056
1056
|
const context = resolveCloudflareD1Context(root, binding);
|
|
1057
1057
|
const database = `D1 database ${context.migrateToken} (${binding})`;
|
|
@@ -1125,7 +1125,7 @@ async function runStudio(root, dialect, remote) {
|
|
|
1125
1125
|
await runDrizzleKitWithDatabaseUrl(root, url, dialect, "studio");
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
1128
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
1128
|
+
const { writeDrizzleConfig } = await import("./config-BgysUhnm.mjs");
|
|
1129
1129
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1130
1130
|
if (!existsSync(dbPath)) {
|
|
1131
1131
|
log.error("No local database found. Start the dev server first.");
|
|
@@ -1145,8 +1145,8 @@ async function runStudio(root, dialect, remote) {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
/** A direct Cloudflare deploy records its D1 or Hyperdrive id in the checked-in Cloudflare config. */
|
|
1147
1147
|
async function hasDeployedCloudflareDatabase(root) {
|
|
1148
|
-
const { readRootWranglerConfig } = await import("./wrangler-
|
|
1149
|
-
const { isRealD1Id, isRealHyperdriveId } = await import("./provision-
|
|
1148
|
+
const { readRootWranglerConfig } = await import("./wrangler-DUB3MGHV.mjs");
|
|
1149
|
+
const { isRealD1Id, isRealHyperdriveId } = await import("./provision-DQF6Kw-6.mjs");
|
|
1150
1150
|
const config = readRootWranglerConfig(root)?.config;
|
|
1151
1151
|
const entries = (key) => {
|
|
1152
1152
|
const value = config?.[key];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as removeProjectConfig, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { L as log, O as cancel, X as text, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { m as printSuccess, p as note, r as createSpinner } from "./output-BCdLioKP.mjs";
|
|
6
6
|
import { a as resolveProjectBySlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
7
7
|
// src/cli/delete.ts
|