void 0.10.11 → 0.10.13
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/cli/cli.mjs +14 -14
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{config-E03l1C_h.mjs → config-qHGgPuWT.mjs} +23 -0
- package/dist/{db-PZBsLSGb.mjs → db-C0i0sYMS.mjs} +3 -3
- package/dist/{deploy-DT8wsPZd.mjs → deploy-jBJT1fUT.mjs} +408 -66
- package/dist/{env-AAHU02L6.mjs → env-CZy5MorI.mjs} +1 -1
- package/dist/{env-validation-BdDlGhbN.mjs → env-validation-Dea3v3ej.mjs} +1 -1
- package/dist/{gen-oup1xBN0.mjs → gen-BzXf3Jh2.mjs} +1 -1
- package/dist/{git-metadata-CBKaL0v5.mjs → git-metadata-D-gurjzG.mjs} +6 -5
- package/dist/{github-cmd-BdNaOVNa.mjs → github-cmd-DKcGUNsj.mjs} +1 -1
- package/dist/{headers-BQknpzkn.mjs → headers-ChAADPQu.mjs} +1 -1
- package/dist/index.mjs +91 -43
- package/dist/{init-Dl2PKuQn.mjs → init-7JCAcKNQ.mjs} +2 -2
- package/dist/{node-BDx8pmhq.mjs → node-pRg81HqV.mjs} +3 -3
- package/dist/pages/index.mjs +3 -3
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/{prepare-DOBTY0o4.mjs → prepare-BvvgAz-3.mjs} +3 -3
- package/dist/{preset-BGrvB4Bl.mjs → preset-BjyR3lzz.mjs} +55 -2
- package/dist/{provision-BLrCEBbI.mjs → provision-CPx2ZxsH.mjs} +2 -2
- package/dist/{route-types-COI2DsZv.mjs → route-types-z1jtHEi_.mjs} +8 -1
- package/dist/{scan-DYXkrasO.mjs → scan-ChWt4pX1.mjs} +12 -13
- package/dist/{scan-DEwlM_Xy.mjs → scan-NU4xKGci.mjs} +4 -1
- package/package.json +2 -2
- package/schema.json +18 -0
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +1 -1
- package/skills/void/docs/guide/app-types.md +43 -0
- package/skills/void/docs/guide/deployment.md +68 -1
- package/skills/void/docs/guide/edge/static-assets.md +37 -1
- package/skills/void/docs/guide/server-routing.md +21 -1
- package/skills/void/docs/guide/websockets.md +3 -0
- package/skills/void/docs/integrations/frameworks/overview.md +1 -0
- package/skills/void/docs/node_modules/void/CLAUDE.md +3 -1
- package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +1 -1
- package/skills/void/docs/reference/cli.md +24 -0
- package/skills/void/docs/reference/config.md +42 -1
- package/skills/void/docs/reference/structure.md +1 -0
package/dist/cli/cli.mjs
CHANGED
|
@@ -2078,7 +2078,7 @@ else if (command === "deploy") {
|
|
|
2078
2078
|
log.error(err instanceof Error ? err.message : String(err));
|
|
2079
2079
|
process.exit(1);
|
|
2080
2080
|
}
|
|
2081
|
-
import("../deploy-
|
|
2081
|
+
import("../deploy-jBJT1fUT.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
2082
2082
|
runDeploy(root, {
|
|
2083
2083
|
projectSlug: deployArgs.projectSlug,
|
|
2084
2084
|
dir: deployArgs.dir,
|
|
@@ -2096,10 +2096,10 @@ else if (command === "deploy") {
|
|
|
2096
2096
|
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-D_w-4w5B.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
2097
2097
|
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-Dt32J6RI.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
2098
2098
|
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-DiaNQbrl.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
2099
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
2100
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
2101
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
2102
|
-
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
2099
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-C0i0sYMS.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
2100
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-CZy5MorI.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
2101
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-BzXf3Jh2.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
2102
|
+
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-DKcGUNsj.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
2103
2103
|
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-Bujrv5q-.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
|
|
2104
2104
|
else if (command === "prepare") {
|
|
2105
2105
|
const root = process.cwd();
|
|
@@ -2110,7 +2110,7 @@ else if (command === "prepare") {
|
|
|
2110
2110
|
log.error(err instanceof Error ? err.message : String(err));
|
|
2111
2111
|
process.exit(1);
|
|
2112
2112
|
}
|
|
2113
|
-
import("../prepare-
|
|
2113
|
+
import("../prepare-BvvgAz-3.mjs").then(({ runPrepareCommand }) => {
|
|
2114
2114
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
2115
2115
|
log.error(err.message ?? err);
|
|
2116
2116
|
process.exit(1);
|
|
@@ -2118,7 +2118,7 @@ else if (command === "prepare") {
|
|
|
2118
2118
|
});
|
|
2119
2119
|
} else if (command === "init") {
|
|
2120
2120
|
const root = process.cwd();
|
|
2121
|
-
import("../init-
|
|
2121
|
+
import("../init-7JCAcKNQ.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
2122
2122
|
let initArgs;
|
|
2123
2123
|
try {
|
|
2124
2124
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -2217,12 +2217,12 @@ else if (command === "-v" || command === "--version") {
|
|
|
2217
2217
|
const root = process.cwd();
|
|
2218
2218
|
switch (cmd) {
|
|
2219
2219
|
case "init": {
|
|
2220
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
2220
|
+
const { runInitCommand, parseInitArgs } = await import("../init-7JCAcKNQ.mjs");
|
|
2221
2221
|
await runInitCommand(root, parseInitArgs([]));
|
|
2222
2222
|
return;
|
|
2223
2223
|
}
|
|
2224
2224
|
case "deploy": {
|
|
2225
|
-
const { runDeploy } = await import("../deploy-
|
|
2225
|
+
const { runDeploy } = await import("../deploy-jBJT1fUT.mjs").then((n) => n.t);
|
|
2226
2226
|
await runDeploy(root);
|
|
2227
2227
|
return;
|
|
2228
2228
|
}
|
|
@@ -2235,13 +2235,13 @@ else if (command === "-v" || command === "--version") {
|
|
|
2235
2235
|
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-D_w-4w5B.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
2236
2236
|
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-Dt32J6RI.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
2237
2237
|
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-DiaNQbrl.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
2238
|
-
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-
|
|
2238
|
+
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-DKcGUNsj.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
2239
2239
|
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-Bujrv5q-.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
|
|
2240
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
2241
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
2242
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
2240
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-C0i0sYMS.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
2241
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-CZy5MorI.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
2242
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-BzXf3Jh2.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
2243
2243
|
case "prepare": {
|
|
2244
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
2244
|
+
const { runPrepareCommand } = await import("../prepare-BvvgAz-3.mjs");
|
|
2245
2245
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
2246
2246
|
return;
|
|
2247
2247
|
}
|
|
@@ -208,7 +208,7 @@ async function runFactsChild(root) {
|
|
|
208
208
|
});
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-
|
|
211
|
+
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-Dea3v3ej.mjs").then((n) => n.c);
|
|
212
212
|
try {
|
|
213
213
|
emitResult({
|
|
214
214
|
kind: "ok",
|
|
@@ -233,7 +233,7 @@ async function runFactsChild(root) {
|
|
|
233
233
|
* fault → fail closed as a values-free schema error.
|
|
234
234
|
*/
|
|
235
235
|
async function runValidateEmittedChild(root) {
|
|
236
|
-
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-
|
|
236
|
+
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-Dea3v3ej.mjs").then((n) => n.c);
|
|
237
237
|
const emitted = readEmittedWorkerVars(root);
|
|
238
238
|
if (!emitted.ok) {
|
|
239
239
|
emitResult({
|
|
@@ -5,6 +5,7 @@ import { i as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-C
|
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
var config_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
VALID_NOT_FOUND_HANDLING: () => VALID_NOT_FOUND_HANDLING,
|
|
8
9
|
VALID_REDIRECT_STATUSES: () => VALID_REDIRECT_STATUSES,
|
|
9
10
|
assertSingleSplat: () => assertSingleSplat,
|
|
10
11
|
assertUniqueCaptureNames: () => assertUniqueCaptureNames,
|
|
@@ -35,6 +36,15 @@ const VALID_APP_TYPES = /* @__PURE__ */ new Set([
|
|
|
35
36
|
]);
|
|
36
37
|
const VALID_OUTPUTS = /* @__PURE__ */ new Set(["server", "static"]);
|
|
37
38
|
/**
|
|
39
|
+
* Accepted `routing.notFound` values. Source of truth for the framework, the
|
|
40
|
+
* `AssetConfig.not_found_handling` field, and the schema.json enum.
|
|
41
|
+
*/
|
|
42
|
+
const VALID_NOT_FOUND_HANDLING = /* @__PURE__ */ new Set([
|
|
43
|
+
"single-page-application",
|
|
44
|
+
"404-page",
|
|
45
|
+
"none"
|
|
46
|
+
]);
|
|
47
|
+
/**
|
|
38
48
|
* Allowed 3xx redirect statuses. Source of truth for the framework, the
|
|
39
49
|
* `_redirects` parser (`cli/headers.ts`), and the schema.json enum. 303 is
|
|
40
50
|
* included for POST→GET after-submit patterns; 304/305/306 aren't
|
|
@@ -48,6 +58,8 @@ const VALID_REDIRECT_STATUSES = /* @__PURE__ */ new Set([
|
|
|
48
58
|
308
|
|
49
59
|
]);
|
|
50
60
|
const VALID_DATABASE_VALUES = /* @__PURE__ */ new Set(["pg"]);
|
|
61
|
+
/** Cloudflare's hard maximum for Workers CPU time per request (5 minutes). */
|
|
62
|
+
const MAX_WORKER_CPU_MS = 3e5;
|
|
51
63
|
const VALID_SANDBOX_INSTANCE_TYPES = /* @__PURE__ */ new Set([
|
|
52
64
|
"dev",
|
|
53
65
|
"lite",
|
|
@@ -279,6 +291,9 @@ function readConfig(root) {
|
|
|
279
291
|
if (obj.routing !== void 0) {
|
|
280
292
|
if (typeof obj.routing !== "object" || obj.routing === null || Array.isArray(obj.routing)) throw new Error(`config: "routing" in ${CONFIG_FILE} must be an object.`);
|
|
281
293
|
const routing = obj.routing;
|
|
294
|
+
if (routing.notFound !== void 0) {
|
|
295
|
+
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(", ")}.`);
|
|
296
|
+
}
|
|
282
297
|
if (routing.revalidate !== void 0) if (typeof routing.revalidate === "number") {
|
|
283
298
|
if (!Number.isFinite(routing.revalidate) || routing.revalidate < 0) throw new Error(`config: "routing.revalidate" in ${CONFIG_FILE} must be a non-negative finite number.`);
|
|
284
299
|
} else if (typeof routing.revalidate === "object" && routing.revalidate !== null && !Array.isArray(routing.revalidate)) {
|
|
@@ -426,6 +441,14 @@ function readConfig(root) {
|
|
|
426
441
|
if (typeof w.vars !== "object" || w.vars === null || Array.isArray(w.vars)) throw new Error(`config: "worker.vars" in ${CONFIG_FILE} must be an object.`);
|
|
427
442
|
for (const [key, value] of Object.entries(w.vars)) if (typeof value !== "string") throw new Error(`config: "worker.vars.${key}" in ${CONFIG_FILE} must be a string.`);
|
|
428
443
|
}
|
|
444
|
+
if (w.limits !== void 0) {
|
|
445
|
+
if (typeof w.limits !== "object" || w.limits === null || Array.isArray(w.limits)) throw new Error(`config: "worker.limits" in ${CONFIG_FILE} must be an object.`);
|
|
446
|
+
const limits = w.limits;
|
|
447
|
+
for (const key of Object.keys(limits)) if (key !== "cpu_ms") throw new Error(`config: Unknown key 'worker.limits.${key}' in ${CONFIG_FILE}. Valid: cpu_ms.`);
|
|
448
|
+
if (limits.cpu_ms !== void 0) {
|
|
449
|
+
if (typeof limits.cpu_ms !== "number" || !Number.isInteger(limits.cpu_ms) || limits.cpu_ms < 1 || limits.cpu_ms > MAX_WORKER_CPU_MS) throw new Error(`config: "worker.limits.cpu_ms" in ${CONFIG_FILE} must be an integer between 1 and ${MAX_WORKER_CPU_MS}.`);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
429
452
|
}
|
|
430
453
|
if (obj.database !== void 0) {
|
|
431
454
|
if (typeof obj.database !== "string" || !VALID_DATABASE_VALUES.has(obj.database)) throw new Error(`config: "database" in ${CONFIG_FILE} must be "pg".`);
|
|
@@ -3,11 +3,11 @@ import { D as outro, S as confirm, T as log, a as cliTitle, j as isCancel, s as
|
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
4
4
|
import { t as cfAccessHeaders } from "./cf-access-Bqw81xAf.mjs";
|
|
5
5
|
import { b as readProjectConfig, f as getToken, m as isStagingMode, n as PlatformClient, t as PlatformApiError } from "./client-Gb71-XkG.mjs";
|
|
6
|
-
import { c as getDatabaseDialect, f as readConfig, p as resolveBindingNames } from "./config-
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig, p as resolveBindingNames } from "./config-qHGgPuWT.mjs";
|
|
7
7
|
import { r as detectFramework } from "./plugin-inference-DMeavIJ6.mjs";
|
|
8
8
|
import { c as collectMigrations, d as stripSqlExt, f as writeJournal, n as listDrizzleArtifacts, r as validateMigrations, t as assertJournalCoherence, u as readJournal } from "./validate-Cw_RLeTj.mjs";
|
|
9
9
|
import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-D-3_D-Gl.mjs";
|
|
10
|
-
import { formatTimestamp } from "./gen-
|
|
10
|
+
import { formatTimestamp } from "./gen-BzXf3Jh2.mjs";
|
|
11
11
|
import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
13
13
|
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-qHGgPuWT.mjs").then((n) => n.n);
|
|
951
951
|
if (getDialect(readVoidConfig(root)) !== "postgresql") {
|
|
952
952
|
log.error("db: This command is only for PostgreSQL projects. Set \"database\": \"pg\" in void.json.");
|
|
953
953
|
process.exit(1);
|