void 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{better-auth-shared-ChVbrq52.mjs → better-auth-shared-QAfk8CAS.mjs} +1 -1
- package/dist/cli/cli.mjs +14 -14
- package/dist/{config-BVEC0lti.mjs → config-8dLIngKW.mjs} +1 -1
- package/dist/{db-DiddQC2v.mjs → db-UW4IYQFw.mjs} +4 -4
- package/dist/{deploy-CRU9fGjE.mjs → deploy-RQXpVBL-.mjs} +27 -10
- package/dist/{domain-DxTc6HDn.mjs → domain-B7RntQ1r.mjs} +12 -27
- package/dist/{drizzle-2fs1qTgy.mjs → drizzle-DYstYz0j.mjs} +1 -1
- package/dist/{env-Bvw0wMTI.mjs → env-C_ZcxxED.mjs} +2 -2
- package/dist/{env-types-D6qI1ThV.mjs → env-types-CaJaIRXU.mjs} +1 -1
- package/dist/{env-validation-DBJsxZLz.mjs → env-validation-LH6eoyW-.mjs} +3 -3
- package/dist/{gen-CZdNWIaA.mjs → gen-O5mXZ76K.mjs} +2 -2
- package/dist/{handler-xflsMwWM.d.mts → handler-hm9KldPP.d.mts} +21 -1
- package/dist/{headers-Y0jshugF.mjs → headers-VkAnACKX.mjs} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +48 -43
- package/dist/{init-BHupO7Fm.mjs → init-DGrLx2ls.mjs} +5 -5
- package/dist/{node-CHWVVjO6.mjs → node-Df8UjQ2H.mjs} +2 -2
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/index.d.mts +7 -5
- package/dist/pages/index.mjs +3 -3
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +29 -11
- package/dist/{plugin-inference-BUBhHt_1.mjs → plugin-inference--7geW5Z2.mjs} +1 -1
- package/dist/{prepare-CrlAVbWS.mjs → prepare-DT-7QII_.mjs} +14 -19
- package/dist/{preset-CIJG2O7a.mjs → preset-2aBxMfY1.mjs} +1 -1
- package/dist/{project-tsconfig-HAGjfY6w.mjs → project-tsconfig-BTNuNoJ0.mjs} +18 -4
- package/dist/{protocol-DYca39yJ.d.mts → protocol-B9GZA4Bn.d.mts} +7 -4
- package/dist/{route-types-jxRfWuCb.mjs → route-types-D03ryMXz.mjs} +3 -2
- package/dist/runtime/ai.d.mts +20 -100
- package/dist/runtime/ai.mjs +101 -54
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/handler.d.mts +2 -2
- package/dist/runtime/handler.mjs +67 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-BNC_1OsY.mjs → scan-B2H1Vo2C.mjs} +3 -3
- package/dist/{scan-2YmJkYAf.mjs → scan-VCAM1oh3.mjs} +55 -29
- package/dist/{types-Dm9kep2X.d.mts → types-DEWCqHtl.d.mts} +12 -3
- package/package.json +2 -2
- package/skills/void/docs/guide/ai.md +109 -51
- package/skills/void/docs/guide/pages-routing/layouts.md +8 -7
- package/skills/void/docs/guide/pages-routing/loaders.md +1 -1
- package/skills/void/docs/guide/pages-routing/overview.md +32 -5
- package/skills/void/docs/guide/server-routing.md +28 -0
- package/skills/void/docs/node_modules/void/AGENTS.md +15 -14
- package/skills/void/docs/node_modules/void/README.md +1 -0
- package/skills/void/docs/reference/api.md +53 -3
- package/skills/void/docs/reference/cli.md +4 -2
- package/skills/void/docs/reference/config.md +1 -1
- /package/dist/{dist-DR9sIMbM.mjs → dist-5cGIJHQQ.mjs} +0 -0
- /package/dist/{dotenv-Bkoqyq9r.mjs → dotenv-lS94ymhM.mjs} +0 -0
- /package/dist/{log-CWWZV4V1.mjs → log-BdD_Fpms.mjs} +0 -0
- /package/dist/{providers-uC0PJg1c.mjs → providers-BwPbdHdi.mjs} +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-
|
|
1
|
+
import { a as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-BwPbdHdi.mjs";
|
|
2
2
|
import { authContext } from "./runtime/auth.mjs";
|
|
3
3
|
import { randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import { betterAuth } from "better-auth";
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -1553,7 +1553,7 @@ else if (command === "deploy") {
|
|
|
1553
1553
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1554
1554
|
process.exit(1);
|
|
1555
1555
|
}
|
|
1556
|
-
import("../deploy-
|
|
1556
|
+
import("../deploy-RQXpVBL-.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
1557
1557
|
runDeploy(root, {
|
|
1558
1558
|
projectSlug: deployArgs.projectSlug,
|
|
1559
1559
|
dir: deployArgs.dir,
|
|
@@ -1568,10 +1568,10 @@ else if (command === "deploy") {
|
|
|
1568
1568
|
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-CPkWrQR9.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
1569
1569
|
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-CLrqSbqj.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1570
1570
|
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-C_uTY7xx.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1571
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1572
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1573
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1574
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1571
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-B7RntQ1r.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1572
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-UW4IYQFw.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1573
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-C_ZcxxED.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1574
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-O5mXZ76K.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1575
1575
|
else if (command === "prepare") {
|
|
1576
1576
|
const root = process.cwd();
|
|
1577
1577
|
let prepareArgs;
|
|
@@ -1581,7 +1581,7 @@ else if (command === "prepare") {
|
|
|
1581
1581
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1582
1582
|
process.exit(1);
|
|
1583
1583
|
}
|
|
1584
|
-
import("../prepare-
|
|
1584
|
+
import("../prepare-DT-7QII_.mjs").then(({ runPrepareCommand }) => {
|
|
1585
1585
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1586
1586
|
R.error(err.message ?? err);
|
|
1587
1587
|
process.exit(1);
|
|
@@ -1589,7 +1589,7 @@ else if (command === "prepare") {
|
|
|
1589
1589
|
});
|
|
1590
1590
|
} else if (command === "init") {
|
|
1591
1591
|
const root = process.cwd();
|
|
1592
|
-
import("../init-
|
|
1592
|
+
import("../init-DGrLx2ls.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1593
1593
|
let initArgs;
|
|
1594
1594
|
try {
|
|
1595
1595
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1678,12 +1678,12 @@ else if (command === "-v" || command === "--version") {
|
|
|
1678
1678
|
const root = process.cwd();
|
|
1679
1679
|
switch (cmd) {
|
|
1680
1680
|
case "init": {
|
|
1681
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1681
|
+
const { runInitCommand, parseInitArgs } = await import("../init-DGrLx2ls.mjs");
|
|
1682
1682
|
await runInitCommand(root, parseInitArgs([]));
|
|
1683
1683
|
return;
|
|
1684
1684
|
}
|
|
1685
1685
|
case "deploy": {
|
|
1686
|
-
const { runDeploy } = await import("../deploy-
|
|
1686
|
+
const { runDeploy } = await import("../deploy-RQXpVBL-.mjs").then((n) => n.t);
|
|
1687
1687
|
await runDeploy(root);
|
|
1688
1688
|
return;
|
|
1689
1689
|
}
|
|
@@ -1695,12 +1695,12 @@ else if (command === "-v" || command === "--version") {
|
|
|
1695
1695
|
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-CPkWrQR9.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
1696
1696
|
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-CLrqSbqj.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1697
1697
|
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-C_uTY7xx.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1698
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
1699
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
1700
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
1701
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
1698
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-B7RntQ1r.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1699
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-UW4IYQFw.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1700
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-C_ZcxxED.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1701
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-O5mXZ76K.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1702
1702
|
case "prepare": {
|
|
1703
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1703
|
+
const { runPrepareCommand } = await import("../prepare-DT-7QII_.mjs");
|
|
1704
1704
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-DJd-R1mw.mjs";
|
|
2
2
|
import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
3
3
|
import { a as validateSourceDir } from "./project-paths-CCMrHYQm.mjs";
|
|
4
|
-
import { i as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-
|
|
4
|
+
import { i as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-BwPbdHdi.mjs";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
var config_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -5,12 +5,12 @@ import { t as cfAccessHeaders } from "./cf-access-DKDsgwOU.mjs";
|
|
|
5
5
|
import { c as getToken, n as PlatformClient, t as PlatformApiError, u as isStagingMode } from "./client-DIfOFf1W.mjs";
|
|
6
6
|
import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
7
7
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
8
|
-
import { c as getDatabaseDialect, f as readConfig, p as resolveBindingNames } from "./config-
|
|
9
|
-
import { r as detectFramework } from "./plugin-inference
|
|
8
|
+
import { c as getDatabaseDialect, f as readConfig, p as resolveBindingNames } from "./config-8dLIngKW.mjs";
|
|
9
|
+
import { r as detectFramework } from "./plugin-inference--7geW5Z2.mjs";
|
|
10
10
|
import { a as writeJournal, i as stripSqlExt, r as readJournal, t as collectMigrations } from "./collect-9rO3JFNM.mjs";
|
|
11
11
|
import { n as listDrizzleArtifacts, r as validateMigrations, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
|
|
12
12
|
import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-M3pxItg2.mjs";
|
|
13
|
-
import { formatTimestamp } from "./gen-
|
|
13
|
+
import { formatTimestamp } from "./gen-O5mXZ76K.mjs";
|
|
14
14
|
import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
15
15
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
16
16
|
import { execFileSync } from "node:child_process";
|
|
@@ -947,7 +947,7 @@ async function runExport(root, args, dialect) {
|
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
async function runSetUrl(root) {
|
|
950
|
-
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-
|
|
950
|
+
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-8dLIngKW.mjs").then((n) => n.n);
|
|
951
951
|
if (getDialect(readVoidConfig(root)) !== "postgresql") {
|
|
952
952
|
R.error("db: This command is only for PostgreSQL projects. Set \"database\": \"pg\" in void.json.");
|
|
953
953
|
process.exit(1);
|
|
@@ -6,24 +6,24 @@ import { t as findVoidAuthConfig } from "./config-hhMYPVRT.mjs";
|
|
|
6
6
|
import { a as isExpiredTokenError, c as getToken, i as isCliOutdatedError, l as getTokenSource, n as PlatformClient, o as parsePlatformErrorBody, t as PlatformApiError, u as isStagingMode } from "./client-DIfOFf1W.mjs";
|
|
7
7
|
import { c as R, g as ge, u as Se, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
8
8
|
import { a as writeProjectConfig, r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
9
|
-
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-
|
|
10
|
-
import { a as scanQueuesSync, i as scanWebSocketRoutesSync, o as scanJobsSync, r as scanRoutes } from "./scan-
|
|
11
|
-
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference
|
|
12
|
-
import { i as voidWarn, r as voidLog } from "./log-
|
|
9
|
+
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-8dLIngKW.mjs";
|
|
10
|
+
import { a as scanQueuesSync, i as scanWebSocketRoutesSync, o as scanJobsSync, r as scanRoutes } from "./scan-B2H1Vo2C.mjs";
|
|
11
|
+
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference--7geW5Z2.mjs";
|
|
12
|
+
import { i as voidWarn, r as voidLog } from "./log-BdD_Fpms.mjs";
|
|
13
13
|
import { t as discoverSchema } from "./discover-C8N1I4tK.mjs";
|
|
14
|
-
import { t as findEnvFile } from "./env-types-
|
|
15
|
-
import { i as validateProdEnv, n as formatEnvReport, r as getDeployEnvDefaults, t as fetchRemoteSecretNames } from "./env-validation-
|
|
14
|
+
import { t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
|
|
15
|
+
import { i as validateProdEnv, n as formatEnvReport, r as getDeployEnvDefaults, t as fetchRemoteSecretNames } from "./env-validation-LH6eoyW-.mjs";
|
|
16
16
|
import { n as writeDrizzleConfig } from "./config--wXmVOoe.mjs";
|
|
17
17
|
import { t as collectMigrations } from "./collect-9rO3JFNM.mjs";
|
|
18
18
|
import { n as buildMigrationPlanBundle } from "./plan-aD3wRDqF.mjs";
|
|
19
19
|
import { r as validateMigrations, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
|
|
20
|
-
import { t as scanPages } from "./scan-
|
|
20
|
+
import { t as scanPages } from "./scan-VCAM1oh3.mjs";
|
|
21
21
|
import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-M3pxItg2.mjs";
|
|
22
22
|
import { i as promptProjectSetupAction, n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-DCUrFJxa.mjs";
|
|
23
23
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
24
|
-
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-
|
|
24
|
+
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-VkAnACKX.mjs";
|
|
25
25
|
import { t as promptForLoginToken } from "./login-tt1OmNVg.mjs";
|
|
26
|
-
import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-
|
|
26
|
+
import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-2aBxMfY1.mjs";
|
|
27
27
|
import { createRequire } from "node:module";
|
|
28
28
|
import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
29
29
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -2297,6 +2297,7 @@ var deploy_exports = /* @__PURE__ */ __exportAll({
|
|
|
2297
2297
|
hasDeploySchemaDrift: () => hasDeploySchemaDrift,
|
|
2298
2298
|
promptDeployProjectConfig: () => promptDeployProjectConfig,
|
|
2299
2299
|
resolveDeployLiveBindingConfig: () => resolveDeployLiveBindingConfig,
|
|
2300
|
+
resolveDeployWorkerMain: () => resolveDeployWorkerMain,
|
|
2300
2301
|
resolveDeployWranglerCompat: () => resolveDeployWranglerCompat,
|
|
2301
2302
|
resolveDistDir: () => resolveDistDir,
|
|
2302
2303
|
resolveStaticBuildCommand: () => resolveStaticBuildCommand,
|
|
@@ -2376,6 +2377,19 @@ function resolveDeployWranglerCompat(root, config, buildOutputDir, requirements)
|
|
|
2376
2377
|
compatibilityFlags
|
|
2377
2378
|
};
|
|
2378
2379
|
}
|
|
2380
|
+
function resolveDeployWorkerMain(config, buildOutputDir) {
|
|
2381
|
+
if (isNodeTarget(config.target)) return;
|
|
2382
|
+
try {
|
|
2383
|
+
const wrangler = JSON.parse(readFileSync(join(buildOutputDir, "wrangler.json"), "utf-8"));
|
|
2384
|
+
return typeof wrangler.main === "string" && wrangler.main.length > 0 ? wrangler.main : void 0;
|
|
2385
|
+
} catch {
|
|
2386
|
+
return;
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
function assertWorkerMainUploaded(workerFiles, workerMain) {
|
|
2390
|
+
if (!workerMain || workerFiles.size === 0) return;
|
|
2391
|
+
if (!workerFiles.has(workerMain)) throw new Error(`deploy: Worker entry '${workerMain}' from wrangler.json was not found in uploaded worker modules.`);
|
|
2392
|
+
}
|
|
2379
2393
|
/**
|
|
2380
2394
|
* Run the full deploy pipeline:
|
|
2381
2395
|
* 1. Check auth
|
|
@@ -3196,7 +3210,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3196
3210
|
else revalidate = perPageRules;
|
|
3197
3211
|
}
|
|
3198
3212
|
if (deployConfig.output === "static" && pageScan && !isSsr) {
|
|
3199
|
-
if (pageScan.pages.every((p) => p.
|
|
3213
|
+
if (pageScan.pages.every((p) => p.shouldPrerender && (p.params.length === 0 && !p.catchAll || p.hasGetPrerenderPaths)) && !(hasRoutes || hasMiddleware || hasWebSockets || authEnabled || liveConfig !== void 0) && schedules.length === 0 && queues.length === 0) {
|
|
3200
3214
|
R.info("All pages prerendered — deploying as static site");
|
|
3201
3215
|
cliLog?.info("full_to_static_redirect", { reason: "all_pages_prerendered" });
|
|
3202
3216
|
return runStaticDeploy(root, config, client, {
|
|
@@ -3223,6 +3237,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3223
3237
|
dialect,
|
|
3224
3238
|
needsSandbox: effectiveBindings.needsSandbox
|
|
3225
3239
|
});
|
|
3240
|
+
const workerMain = resolveDeployWorkerMain(deployConfig, join(distDir, workerDirName));
|
|
3226
3241
|
const envVars = loadDeployEnv(root);
|
|
3227
3242
|
await assertEnvSchemaValid(root, client, config.projectId);
|
|
3228
3243
|
await applySchemaDefaultsToVars(root, envVars);
|
|
@@ -3264,6 +3279,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3264
3279
|
const voidPackageOptions = {
|
|
3265
3280
|
compatibilityDate: wranglerCompat?.compatibilityDate,
|
|
3266
3281
|
compatibilityFlags: wranglerCompat?.compatibilityFlags,
|
|
3282
|
+
...workerMain && { workerMain },
|
|
3267
3283
|
...sandboxConfig && { sandbox: sandboxConfig },
|
|
3268
3284
|
...liveConfig && { live: liveConfig },
|
|
3269
3285
|
revalidateQueryAllowlist: deployConfig.routing?.revalidateQueryAllowlist
|
|
@@ -3311,6 +3327,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3311
3327
|
}
|
|
3312
3328
|
}
|
|
3313
3329
|
const workerFiles = collectWorkerFiles(workerDir);
|
|
3330
|
+
assertWorkerMainUploaded(workerFiles, workerMain);
|
|
3314
3331
|
cliLog?.info("package_end", {
|
|
3315
3332
|
mode: "full",
|
|
3316
3333
|
durationMs: Date.now() - packageStartedAt
|
|
@@ -39,20 +39,13 @@ async function domainAdd(client, projectId, hostname) {
|
|
|
39
39
|
R.success(`Domain ${hostname} added (status: ${domain.status})`);
|
|
40
40
|
let cnameSection;
|
|
41
41
|
let ownershipSection;
|
|
42
|
-
let sslSection;
|
|
43
42
|
if (domain.cname_target) cnameSection = `CNAME (traffic)\n ${hostname} → ${domain.cname_target}`;
|
|
44
43
|
if (domain.ownership_verification) ownershipSection = `TXT (ownership verification)\n ${domain.ownership_verification.name} → ${domain.ownership_verification.value}`;
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
cnameSection,
|
|
51
|
-
ownershipSection,
|
|
52
|
-
sslSection,
|
|
53
|
-
summary
|
|
54
|
-
].filter((s) => s !== void 0);
|
|
55
|
-
if (sections.length > 0) Se(sections.join("\n\n"), "DNS Setup");
|
|
44
|
+
const recordSections = [cnameSection, ownershipSection].filter((s) => s !== void 0);
|
|
45
|
+
if (recordSections.length > 0) {
|
|
46
|
+
const summary = `Add ${recordSections.length === 1 ? "the record above" : "the records above"} to your DNS, then run \`void domain status ${hostname}\` to check progress.`;
|
|
47
|
+
Se([...recordSections, summary].join("\n\n"), "DNS Setup");
|
|
48
|
+
}
|
|
56
49
|
}
|
|
57
50
|
async function domainRemove(client, projectId, hostname) {
|
|
58
51
|
const domain = (await client.listDomains(projectId)).find((d) => d.hostname === hostname);
|
|
@@ -93,7 +86,7 @@ function computeRollup(status) {
|
|
|
93
86
|
};
|
|
94
87
|
if (status.cf_status === "pending_issuance" || status.cf_status === "active" && status.ssl_status !== "active") return {
|
|
95
88
|
state: "issuing_cert",
|
|
96
|
-
diagnostic: "Cloudflare is issuing the SSL certificate (typically <5 minutes)."
|
|
89
|
+
diagnostic: status.cname_target ? "Cloudflare is issuing the SSL certificate automatically (typically <5 minutes). If this persists, confirm the traffic CNAME below is published." : "Cloudflare is issuing the SSL certificate automatically (typically <5 minutes)."
|
|
97
90
|
};
|
|
98
91
|
if (status.cf_status === "pending_deployment") return {
|
|
99
92
|
state: "deploying_cert",
|
|
@@ -125,20 +118,12 @@ async function domainStatus(client, projectId, hostname, verbose) {
|
|
|
125
118
|
if (status.verification_errors && status.verification_errors.length > 0) rollupLines.push(` Errors: ${status.verification_errors.join(", ")}`);
|
|
126
119
|
}
|
|
127
120
|
Se(rollupLines.join("\n"), "Domain Status");
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const sslRecords = (status.ssl_validation_records ?? []).filter((r) => Boolean(r.txt_name) && Boolean(r.txt_value) && r.status !== "active");
|
|
135
|
-
if (sslRecords.length > 0) {
|
|
136
|
-
const lines = sslRecords.map((r) => ` ${r.txt_name} → ${r.txt_value}`).join("\n");
|
|
137
|
-
pendingSections.push(`TXT (SSL validation)\n${lines}`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (pendingSections.length > 0) Se(pendingSections.join("\n\n"), "Add these DNS records to your provider");
|
|
141
|
-
}
|
|
121
|
+
let cnameSection;
|
|
122
|
+
let ownershipSection;
|
|
123
|
+
if (status.cname_target && status.ssl_status !== "active") cnameSection = `CNAME (traffic)\n ${status.hostname} → ${status.cname_target}`;
|
|
124
|
+
if (status.ownership_verification) ownershipSection = `TXT (ownership verification)\n ${status.ownership_verification.name} → ${status.ownership_verification.value}`;
|
|
125
|
+
const pendingRecords = [cnameSection, ownershipSection].filter((s) => s !== void 0);
|
|
126
|
+
if (pendingRecords.length > 0) Se(pendingRecords.join("\n\n"), pendingRecords.length === 1 ? "Add this DNS record to your provider" : "Add these DNS records to your provider");
|
|
142
127
|
}
|
|
143
128
|
//#endregion
|
|
144
129
|
export { runDomainCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isVoidSocialAuthProvider } from "./providers-
|
|
1
|
+
import { a as isVoidSocialAuthProvider } from "./providers-BwPbdHdi.mjs";
|
|
2
2
|
import { getAuthTables, getSchema } from "better-auth/db";
|
|
3
3
|
//#region src/auth/drizzle.ts
|
|
4
4
|
const DEFAULT_TABLE_ORDER = Number.MAX_SAFE_INTEGER;
|
|
@@ -3,8 +3,8 @@ import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
|
3
3
|
import { c as getToken, n as PlatformClient } from "./client-DIfOFf1W.mjs";
|
|
4
4
|
import { c as R, g as ge, u as Se, y as ye } from "./dist-abzUneor.mjs";
|
|
5
5
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
6
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
7
|
-
import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-
|
|
6
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
|
|
7
|
+
import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-LH6eoyW-.mjs";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
9
|
//#region src/cli/env-example.ts
|
|
10
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as relative } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
|
|
3
|
-
import { i as voidWarn } from "./log-
|
|
3
|
+
import { i as voidWarn } from "./log-BdD_Fpms.mjs";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/codegen/env-types.ts
|
|
6
6
|
/** Roots already warned about duplicate env.ts files — dedupes noisy repeat calls. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
-
import { i as voidWarn } from "./log-
|
|
3
|
-
import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-
|
|
4
|
-
import { t as findEnvFile } from "./env-types-
|
|
2
|
+
import { i as voidWarn } from "./log-BdD_Fpms.mjs";
|
|
3
|
+
import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-lS94ymhM.mjs";
|
|
4
|
+
import { t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
//#region src/host/load-user-env.ts
|
|
7
7
|
/**
|
|
@@ -2,8 +2,8 @@ import { a as join, n as dirname, s as relative } from "./pathe.M-eThtNZ-BrPhGF_
|
|
|
2
2
|
import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
|
|
4
4
|
import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { n as ensureProjectTsconfig } from "./project-tsconfig-BTNuNoJ0.mjs";
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-8dLIngKW.mjs";
|
|
7
7
|
import { n as writeDrizzleConfig } from "./config--wXmVOoe.mjs";
|
|
8
8
|
import { r as readJournal, t as collectMigrations } from "./collect-9rO3JFNM.mjs";
|
|
9
9
|
import { n as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
|
|
@@ -162,6 +162,17 @@ declare module "hono" {
|
|
|
162
162
|
type CloudContext = Context<CloudEnv>;
|
|
163
163
|
type HandlerFn = (c: CloudContext) => unknown | Promise<unknown>;
|
|
164
164
|
type MiddlewareFn = MiddlewareHandler<CloudEnv>;
|
|
165
|
+
type BasicAuthOptionValue = string | (() => string);
|
|
166
|
+
interface BasicAuthOptions {
|
|
167
|
+
/** Username required by the Basic auth challenge. */
|
|
168
|
+
username: BasicAuthOptionValue;
|
|
169
|
+
/** Password required by the Basic auth challenge. */
|
|
170
|
+
password: BasicAuthOptionValue;
|
|
171
|
+
/** Browser prompt realm. Defaults to "Restricted". */
|
|
172
|
+
realm?: BasicAuthOptionValue;
|
|
173
|
+
/** Response body for failed authentication. Defaults to "Authentication required". */
|
|
174
|
+
message?: BasicAuthOptionValue;
|
|
175
|
+
}
|
|
165
176
|
/** Pre-rendered asset tags injected by the SSR build. */
|
|
166
177
|
type RenderAssetTags = {
|
|
167
178
|
/** CSS stylesheet links for `<head>`. */css: string; /** JS modulepreload links for `<head>` (only when page needs JS). */
|
|
@@ -243,6 +254,15 @@ declare namespace defineHandler {
|
|
|
243
254
|
*/
|
|
244
255
|
declare function defineMiddleware(handler: MiddlewareHandler<CloudEnv>): MiddlewareHandler<CloudEnv>;
|
|
245
256
|
/**
|
|
257
|
+
* Create Basic authentication middleware for temporary site gates and
|
|
258
|
+
* pre-launch protection.
|
|
259
|
+
*
|
|
260
|
+
* Void internal endpoints under `/__void` are always excluded so deploy-time
|
|
261
|
+
* migrations, prerendering, cron/queue dispatch, and remote binding helpers
|
|
262
|
+
* continue to reach Void's own internal-token checks.
|
|
263
|
+
*/
|
|
264
|
+
declare function basicAuth(options: BasicAuthOptions): MiddlewareHandler<CloudEnv>;
|
|
265
|
+
/**
|
|
246
266
|
* Identity function that provides type inference for scheduled jobs.
|
|
247
267
|
* At runtime it simply returns the function passed to it.
|
|
248
268
|
*/
|
|
@@ -263,4 +283,4 @@ declare function defineHead<P = Record<string, unknown>>(handler: (c: CloudConte
|
|
|
263
283
|
*/
|
|
264
284
|
declare function defineQueue<T = unknown>(handler: QueueFn<T>): TypedQueueHandler<T>;
|
|
265
285
|
//#endregion
|
|
266
|
-
export {
|
|
286
|
+
export { defer as C, runValidation as D, ValidatorSlots as E, InferProps as S, HandlerInput as T, defineQueue as _, CloudEnv as a, Deferred as b, QueueRetryOptions as c, TypedQueueHandler as d, VoidAssetRewriteError as f, defineMiddleware as g, defineHead as h, CloudContextVariables as i, RenderAssetTags as l, defineHandler as m, CloudBindings as n, QueueBatch as o, basicAuth as p, CloudContext as r, QueueMessage as s, BasicAuthOptions as t, TypedHandler as u, defineRender as v, ValidationError as w, DeferredState as x, defineScheduled as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
-
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-
|
|
3
|
-
import { i as voidWarn } from "./log-
|
|
2
|
+
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-8dLIngKW.mjs";
|
|
3
|
+
import { i as voidWarn } from "./log-BdD_Fpms.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/headers.ts
|
|
6
6
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as HeadDescriptor } from "./head-BsSTGnIe.mjs";
|
|
2
2
|
import { r as AuthUser } from "./auth-CDeb2XAl.mjs";
|
|
3
|
-
import { C as HandlerInput, _ as
|
|
3
|
+
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, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-hm9KldPP.mjs";
|
|
4
4
|
import { QueueMap } from "./runtime/queues.mjs";
|
|
5
5
|
import { PluginConfig } from "@cloudflare/vite-plugin";
|
|
6
6
|
import { Plugin } from "vite";
|
|
@@ -29,4 +29,4 @@ declare function voidPlugin(options?: {
|
|
|
29
29
|
auxiliaryWorkers?: PluginConfig["auxiliaryWorkers"];
|
|
30
30
|
}): Array<Plugin>;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { type AuthUser, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled, voidPlugin };
|
|
32
|
+
export { type AuthUser, type BasicAuthOptions, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled, voidPlugin };
|