void 0.10.10 → 0.10.12
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/AGENT_PROMPT.md +4 -0
- package/README.md +1 -1
- package/dist/{agents-Bmr5tFFb.mjs → agents-CtgBYqld.mjs} +1 -1
- package/dist/{auth-cmd-Cw1edJdZ.mjs → auth-cmd-BqsdZJp5.mjs} +3 -3
- package/dist/{better-auth-shared-BvnM9px6.d.mts → better-auth-shared-DealXecJ.d.mts} +1 -1
- package/dist/{build-cmd-C6kNDJBv.mjs → build-cmd-Bujrv5q-.mjs} +3 -3
- package/dist/{cache-DIUSnIjJ.mjs → cache-C11V8Fxq.mjs} +3 -3
- package/dist/{cancel-deploy-BosnzEHC.mjs → cancel-deploy-fwFYF04b.mjs} +2 -2
- package/dist/cli/cli.mjs +124 -41
- package/dist/cli/env-schema-probe.d.mts +96 -0
- package/dist/cli/env-schema-probe.mjs +272 -0
- package/dist/{client-C9FG6Vzc.mjs → client-Gb71-XkG.mjs} +12 -2
- package/dist/{config-BcAeIPe3.mjs → config-BkTvs43g.mjs} +15 -2
- package/dist/{config-BdUctCZD.mjs → config-CutEMNGJ.mjs} +3 -3
- package/dist/{create-project-CjYX23M_.mjs → create-project-DsYvl3TB.mjs} +3 -3
- package/dist/{db-BvKV34IK.mjs → db-DOiJMRt2.mjs} +27 -27
- package/dist/{delete-CThKLXfi.mjs → delete-mh6p-zkQ.mjs} +3 -3
- package/dist/deploy-u7Rv9q_q.mjs +7126 -0
- package/dist/{discover-BuVVSAum.mjs → discover-CJHyvYfR.mjs} +2 -2
- package/dist/dist-DaKKDf8D.mjs +41 -0
- package/dist/{domain-DMrBabBQ.mjs → domain-DiaNQbrl.mjs} +2 -2
- package/dist/entry-D7yy4xVH.mjs +100 -0
- package/dist/{env-BfG7O71F.mjs → env-CZy5MorI.mjs} +5 -5
- package/dist/env-mask-Dd47NbR6.mjs +90 -0
- package/dist/env-public-BfiLcMBk.d.mts +140 -0
- package/dist/{env-types-D51bnR-c.mjs → env-types-QBj-ndax.mjs} +2 -2
- package/dist/env-validation-Dea3v3ej.mjs +1069 -0
- package/dist/{gen-Bee261SV.mjs → gen-o_w-8yI8.mjs} +8 -8
- package/dist/{git-metadata-CBKaL0v5.mjs → git-metadata-D-gurjzG.mjs} +6 -5
- package/dist/{github-cmd-DfeFEasr.mjs → github-cmd-DKcGUNsj.mjs} +4 -4
- package/dist/{handler-imD0UVDT.d.mts → handler-Cjh8uM3Y.d.mts} +1 -1
- package/dist/{headers-CTAjX-UO.mjs → headers-nsHIFixA.mjs} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +98 -52
- package/dist/{init-xfwW7cLp.mjs → init-3rgHKBVi.mjs} +13 -14
- package/dist/{link-Co136MEs.mjs → link-CdGHSIy-.mjs} +4 -4
- package/dist/{list-BKDjA3M5.mjs → list-CPwFDZ_c.mjs} +3 -3
- package/dist/{login-CrOTnR_6.mjs → login-BT3H8PN3.mjs} +2 -2
- package/dist/{logs-DlAg25ww.mjs → logs-Bt313ax7.mjs} +3 -2
- package/dist/{mcp-BNjMGMB0.mjs → mcp-DoM3_nhd.mjs} +7 -2
- package/dist/{node-CnE-SZCk.mjs → node-Da0UcsGA.mjs} +5 -5
- package/dist/{package-json-B0NuUWGd.mjs → package-json-Cx1osYo6.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/index.d.mts +1 -23
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{plugin-inference-CJxi_fWI.mjs → plugin-inference-DMeavIJ6.mjs} +4 -98
- package/dist/{prepare-BRyC4TCC.mjs → prepare-BoKHgMNx.mjs} +10 -10
- package/dist/preset-BjyR3lzz.mjs +592 -0
- package/dist/{project-cmd-B2bcKefD.mjs → project-cmd-D_w-4w5B.mjs} +13 -9
- package/dist/{project-paths-tpdR1mJR.mjs → project-paths-BQd7OmIo.mjs} +1 -1
- package/dist/project-paths-GpziKeQQ.d.mts +25 -0
- package/dist/{project-tsconfig-D9uSVVpA.mjs → project-tsconfig-B-QtXjLQ.mjs} +2 -2
- package/dist/{protocol-6hTJ04T1.d.mts → protocol-Bnb0LFp3.d.mts} +1 -1
- package/dist/provision-rShh6MKY.mjs +2557 -0
- package/dist/requests-B8sZxaFM.mjs +50 -0
- package/dist/{resolve-project-D2HI3TrG.mjs → resolve-project-BBMtLLV9.mjs} +1 -1
- package/dist/{rollback-9dfmB-YZ.mjs → rollback-CkvTFXx5.mjs} +2 -2
- package/dist/{route-types-CfKfhbIg.mjs → route-types-COI2DsZv.mjs} +2 -2
- package/dist/{runner-h272wcPj.mjs → runner-kapo9aPs.mjs} +3 -3
- package/dist/{runner-pg-waxJOnBb.mjs → runner-pg-CHM76xuC.mjs} +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +1 -139
- package/dist/runtime/env-public.mjs +2 -90
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/{scan-Dp_Gyzs3.mjs → scan-DEwlM_Xy.mjs} +2 -2
- package/dist/{scan-i7Yz54fv.mjs → scan-DYXkrasO.mjs} +4 -4
- package/dist/{secret-DeMnMcV0.mjs → secret-Dt32J6RI.mjs} +3 -3
- package/dist/{skills-DsdNDtX3.mjs → skills-CLjN0uUO.mjs} +2 -2
- package/dist/{subcommand-prompt-DtES-oP6.mjs → subcommand-prompt-BzV8iQZo.mjs} +1 -1
- package/dist/sveltekit.mjs +1 -1
- package/dist/{validate-DT7nFMlf.mjs → validate-Cw_RLeTj.mjs} +1 -1
- package/dist/{yarn-pnp-CW8LB6g_.mjs → yarn-pnp-DJn3SAHF.mjs} +1 -1
- package/getting-started-prompt.txt +3 -1
- package/package.json +5 -3
- package/schema.json +5 -0
- package/skills/void/SKILL.md +34 -33
- package/skills/void/docs/guide/app-types.md +43 -0
- package/skills/void/docs/guide/auth.md +8 -0
- package/skills/void/docs/guide/deployment.md +1 -1
- package/skills/void/docs/guide/edge/static-assets.md +23 -0
- package/skills/void/docs/guide/env-vars.md +14 -6
- package/skills/void/docs/guide/queues.md +4 -0
- package/skills/void/docs/integrations/cloudflare.md +64 -5
- package/skills/void/docs/integrations/frameworks/overview.md +1 -0
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +4 -0
- package/skills/void/docs/node_modules/void/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +64 -0
- package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +64 -0
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +108 -0
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +183 -0
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +34 -33
- package/skills/void/docs/node_modules/void/test/e2e/README.md +85 -0
- package/skills/void/docs/reference/cli.md +74 -14
- package/skills/void/docs/reference/config.md +27 -1
- package/dist/deploy-B02JyKP9.mjs +0 -3748
- package/dist/dotenv-D_UbC_vc.mjs +0 -173
- package/dist/env-validation-CeC2FL66.mjs +0 -163
- package/dist/pathe.M-eThtNZ-CQzLbt4c.mjs +0 -150
- package/dist/preset-CVvwCeIy.mjs +0 -208
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathe/README.md +0 -73
- package/skills/void/docs/node_modules/void/node_modules/pathe/README.md +0 -73
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, s as dim, u as import_picocolors, w as intro } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
|
+
//#region src/cli/requests.ts
|
|
4
|
+
async function runRequestsCommand(root, range, status) {
|
|
5
|
+
console.log();
|
|
6
|
+
intro(cliTitle("project requests"));
|
|
7
|
+
const token = getToken(root);
|
|
8
|
+
if (!token) {
|
|
9
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
if (!/^\d+(m|h|d)$/.test(range)) {
|
|
13
|
+
log.error(`requests: Invalid range '${range}'. Use a format like 15m, 2h, or 3d.`);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
const linked = readProjectConfig(root);
|
|
17
|
+
if (!linked) {
|
|
18
|
+
log.error("No linked project. Run `void project link` first.");
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
const client = new PlatformClient(token, { root });
|
|
22
|
+
let entries;
|
|
23
|
+
try {
|
|
24
|
+
entries = await client.getRequests(linked.projectId, range, 200, status || void 0);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
if (entries.length === 0) {
|
|
30
|
+
outro(`No requests found in the last ${range}${status ? ` matching status ${status}` : ""}.`);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
for (const entry of entries) printRequest(entry);
|
|
34
|
+
outro(dim(`${entries.length} requests`));
|
|
35
|
+
}
|
|
36
|
+
function printRequest(entry) {
|
|
37
|
+
const time = formatTime(entry.timestamp);
|
|
38
|
+
const method = (entry.method || "-").padEnd(4);
|
|
39
|
+
const status = entry.status || "-";
|
|
40
|
+
const statusNum = parseInt(status, 10);
|
|
41
|
+
const coloredStatus = statusNum >= 500 ? import_picocolors.default.red(status) : statusNum >= 400 ? import_picocolors.default.yellow(status) : status;
|
|
42
|
+
const duration = Number.isFinite(entry.durationMs) ? dim(`${Math.round(entry.durationMs)}ms`) : "";
|
|
43
|
+
console.log(`${dim(time)} ${method} ${coloredStatus} ${dim(entry.type)} ${duration}`.trimEnd());
|
|
44
|
+
}
|
|
45
|
+
function formatTime(ts) {
|
|
46
|
+
const d = /* @__PURE__ */ new Date(`${ts.replace(" ", "T")}Z`);
|
|
47
|
+
return Number.isNaN(d.getTime()) ? ts : d.toLocaleTimeString("en-GB", { hour12: false });
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { runRequestsCommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
-
import { a as join } from "./
|
|
2
|
+
import { a as join } from "./dist-DaKKDf8D.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
//#region src/cli/resolve-project.ts
|
|
5
5
|
var resolve_project_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as outro, S as confirm, T as log, a as cliTitle, c as ensureUtc, j as isCancel, k as select, o as createSpinner, s as dim, u as import_picocolors, w as intro, x as cancel } from "./agents-
|
|
2
|
-
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-
|
|
1
|
+
import { D as outro, S as confirm, T as log, a as cliTitle, c as ensureUtc, j as isCancel, k as select, o as createSpinner, s as dim, u as import_picocolors, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
3
|
//#region src/cli/rollback.ts
|
|
4
4
|
async function runRollbackCommand(root, deployId) {
|
|
5
5
|
console.log();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, s as relative } from "./
|
|
2
|
-
import { r as writeFileIfChanged } from "./project-tsconfig-
|
|
1
|
+
import { a as join, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { r as writeFileIfChanged } from "./project-tsconfig-B-QtXjLQ.mjs";
|
|
3
3
|
import { a as isVoidSocialAuthProvider } from "./providers-CJlNS3kT.mjs";
|
|
4
4
|
import { mkdirSync } from "node:fs";
|
|
5
5
|
import { getAuthTables, getSchema } from "better-auth/db";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./
|
|
2
|
-
import { c as collectMigrations, o as classifyMigration } from "./validate-
|
|
3
|
-
import { n as hasPackageDependency, r as readNearestPackageJson } from "./package-json-
|
|
1
|
+
import { a as join, n as dirname } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { c as collectMigrations, o as classifyMigration } from "./validate-Cw_RLeTj.mjs";
|
|
3
|
+
import { n as hasPackageDependency, r as readNearestPackageJson } from "./package-json-Cx1osYo6.mjs";
|
|
4
4
|
import { existsSync, mkdirSync } from "node:fs";
|
|
5
5
|
import { createHash, createHmac } from "node:crypto";
|
|
6
6
|
//#region src/migrations/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-
|
|
1
|
+
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-DealXecJ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/better-auth-pg.d.ts
|
|
4
4
|
declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-
|
|
1
|
+
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-DealXecJ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/better-auth.d.ts
|
|
4
4
|
declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
|
|
@@ -1,142 +1,4 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { t as StandardSchemaV1 } from "../standard-schema-DJ0HW7QP.mjs";
|
|
3
2
|
import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-z4stu8uc.mjs";
|
|
4
|
-
|
|
5
|
-
//#region src/runtime/env-public.d.ts
|
|
6
|
-
type AnyValidator = StandardSchemaV1<unknown, unknown>;
|
|
7
|
-
type AnySchema = Record<string, AnyValidator>;
|
|
8
|
-
/**
|
|
9
|
-
* Type-only stub for the validated env shape. Augmented by the generated
|
|
10
|
-
* `.void/env.d.ts` so `env.X` is typed per the user's schema. Includes an
|
|
11
|
-
* index signature so untyped property access returns `unknown` (rather than
|
|
12
|
-
* a hard error) for bindings and keys not declared in the schema.
|
|
13
|
-
*/
|
|
14
|
-
interface ValidatedEnv {
|
|
15
|
-
readonly [key: string]: unknown;
|
|
16
|
-
}
|
|
17
|
-
type InferEnv<S extends AnySchema> = { readonly [K in keyof S]: StandardSchemaV1.InferOutput<S[K]> };
|
|
18
|
-
/**
|
|
19
|
-
* Register an env schema and return the typed `env` proxy.
|
|
20
|
-
*
|
|
21
|
-
* Calling `defineEnv` is the only required step — Void auto-discovers
|
|
22
|
-
* `env.ts` at project root, imports it, and uses the schema for runtime
|
|
23
|
-
* validation, type generation, and deploy-time secret checks.
|
|
24
|
-
*
|
|
25
|
-
* The return value is identical to the `env` export from `void/env`.
|
|
26
|
-
* Re-export it from your `env.ts` if you prefer the explicit
|
|
27
|
-
* `import { env } from "~/env"` pattern.
|
|
28
|
-
*/
|
|
29
|
-
declare function defineEnv<S extends AnySchema>(schema: S): InferEnv<S>;
|
|
30
|
-
/**
|
|
31
|
-
* Internal: validate the entire schema against the worker's actual env on
|
|
32
|
-
* the first request per isolate. Catches bad remote-secret values and
|
|
33
|
-
* post-deploy drift that the deploy CLI can't see (it only knows secret
|
|
34
|
-
* names, not their values).
|
|
35
|
-
*
|
|
36
|
-
* Spliced into the generated worker entry by `compileWorkerEntry`. Cached
|
|
37
|
-
* after the first call so subsequent requests pay no cost.
|
|
38
|
-
*
|
|
39
|
-
* Async lifecycle: this function awaits any async Standard Schema
|
|
40
|
-
* validators (zod `refine`, arktype async narrows, etc.) and seeds the
|
|
41
|
-
* per-key cache with the resolved values. Subsequent reads via `env.X`
|
|
42
|
-
* hit the sync cache — async work only happens here, at boot. If a user
|
|
43
|
-
* accesses `env.X` for a key with an async validator *before* this
|
|
44
|
-
* function has run (e.g. during module-top-level code), the proxy will
|
|
45
|
-
* throw with guidance pointing back to this boot-time pre-validation.
|
|
46
|
-
*/
|
|
47
|
-
declare function _validateEnvOnce(envValues: unknown): Promise<void>;
|
|
48
|
-
/** Internal: framework-only access to the registered schema (for plugin/CLI). */
|
|
49
|
-
declare function _getRegisteredSchema(): AnySchema | null;
|
|
50
|
-
/**
|
|
51
|
-
* Internal: returns `true` once `defineEnv()` has been called at least once,
|
|
52
|
-
* regardless of whether the caller passed an empty schema. Gives tooling a
|
|
53
|
-
* reliable signal — `_getRegisteredSchema()` alone can't distinguish
|
|
54
|
-
* `defineEnv({})` (an intentional empty schema) from "never called".
|
|
55
|
-
*/
|
|
56
|
-
declare function _hasRegisteredSchema(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Internal: extract `.default(value)` values from the registered schema as
|
|
59
|
-
* stringified env values. Used by the plugin and deploy CLI to seed worker
|
|
60
|
-
* `vars` so `c.env.X` and `process.env.X` see the same fallback that the
|
|
61
|
-
* typed `env.X` proxy returns.
|
|
62
|
-
*
|
|
63
|
-
* Detection is schema-agnostic: probe each validator with `undefined` and,
|
|
64
|
-
* if it succeeds with a non-undefined value, that value is the default.
|
|
65
|
-
* Works for our built-in `.default(...)` helpers and for any Standard
|
|
66
|
-
* Schema validator with intrinsic default behaviour. Async validators are
|
|
67
|
-
* skipped (we can't get a sync default).
|
|
68
|
-
*
|
|
69
|
-
* Keys with no default — required keys, plain `.optional()` — are omitted
|
|
70
|
-
* from the result so they don't shadow user `.env*` entries with empty
|
|
71
|
-
* strings.
|
|
72
|
-
*/
|
|
73
|
-
declare function _getSchemaDefaults(): Record<string, string>;
|
|
74
|
-
declare class EnvValidationError extends Error {
|
|
75
|
-
readonly key: string;
|
|
76
|
-
readonly issues: Array<StandardSchemaV1.Issue>;
|
|
77
|
-
constructor(key: string, issues: Array<StandardSchemaV1.Issue>);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Typed env proxy. Reads from the runtime env, validating declared keys
|
|
81
|
-
* on first access and passing through bindings / unknown keys unchanged.
|
|
82
|
-
*
|
|
83
|
-
* Sync-only: the `get` trap must be synchronous, so validators that return
|
|
84
|
-
* a `Promise` cannot be awaited here. For async Standard Schema validators,
|
|
85
|
-
* `_validateEnvOnce()` pre-resolves them at worker boot and seeds the
|
|
86
|
-
* per-env cache; property reads then serve the cached value synchronously.
|
|
87
|
-
* If an async validator is encountered here without a prior pre-validation,
|
|
88
|
-
* the trap throws with guidance on how to resolve it.
|
|
89
|
-
*/
|
|
90
|
-
declare const env: ValidatedEnv;
|
|
91
|
-
/** Aggregate report from validating an entire env object against the schema. */
|
|
92
|
-
type EnvValidationReport = {
|
|
93
|
-
valid: boolean;
|
|
94
|
-
missing: Array<string>;
|
|
95
|
-
invalid: Array<{
|
|
96
|
-
key: string;
|
|
97
|
-
messages: Array<string>;
|
|
98
|
-
}>;
|
|
99
|
-
/**
|
|
100
|
-
* Resolved values for keys that validated successfully. Used to seed the
|
|
101
|
-
* per-env cache after async pre-validation so sync `env.X` reads hit the
|
|
102
|
-
* cache.
|
|
103
|
-
*/
|
|
104
|
-
values: Map<string, unknown>;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Validate an env record (e.g. merged `.env*` + remote secret list) against
|
|
108
|
-
* the registered schema. Used by the dev plugin (warnings), the deploy CLI
|
|
109
|
-
* (hard error), and `_validateEnvOnce` at worker boot.
|
|
110
|
-
*
|
|
111
|
-
* Async: awaits any validators that return a `Promise` (zod async refines,
|
|
112
|
-
* arktype narrows, etc.). Callers already run in async contexts.
|
|
113
|
-
*/
|
|
114
|
-
declare function validateAllEnv(envValues: Record<string, unknown>): Promise<EnvValidationReport>;
|
|
115
|
-
declare global {
|
|
116
|
-
namespace Cloudflare {
|
|
117
|
-
interface Env {
|
|
118
|
-
DB: D1Database;
|
|
119
|
-
KV: KVNamespace;
|
|
120
|
-
STORAGE: R2Bucket;
|
|
121
|
-
AI: Ai;
|
|
122
|
-
SANDBOX: DurableObjectNamespace<import("@cloudflare/sandbox").Sandbox>;
|
|
123
|
-
/** @internal Service binding to proxy worker (AI, revalidation, future features) */
|
|
124
|
-
__VOID_PROXY?: Fetcher;
|
|
125
|
-
/** @internal Custom proxy URL override */
|
|
126
|
-
__VOID_PROXY_URL?: string;
|
|
127
|
-
/** @internal Auth token for HTTP proxy (local dev) */
|
|
128
|
-
__VOID_TOKEN?: string;
|
|
129
|
-
/** @internal Project ID for HTTP proxy (local dev) */
|
|
130
|
-
__VOID_PROJECT_ID?: string;
|
|
131
|
-
/** @internal Staging environment flag */
|
|
132
|
-
__VOID_STAGING?: string;
|
|
133
|
-
/** @internal Project ID (service binding path) */
|
|
134
|
-
__PROJECT_ID?: string;
|
|
135
|
-
/** @internal Proxy token (service binding path) */
|
|
136
|
-
__VOID_PROXY_TOKEN?: string;
|
|
137
|
-
[key: `QUEUE_${string}`]: Queue<unknown> | undefined;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
//#endregion
|
|
3
|
+
import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-BfiLcMBk.mjs";
|
|
142
4
|
export { type EnvSchema, EnvValidationError, EnvValidationReport, ValidatedEnv, _getRegisteredSchema, _getSchemaDefaults, _hasRegisteredSchema, _validateEnvOnce, boolean, defineEnv, email, env, json, number, oneOf, string, url, validateAllEnv };
|
|
@@ -1,95 +1,7 @@
|
|
|
1
|
+
import { boolean, email, getSecretOverride, json, number, oneOf, string, url } from "./env-helpers.mjs";
|
|
2
|
+
import { n as isUnmaskActive, r as redactMessage } from "../env-mask-Dd47NbR6.mjs";
|
|
1
3
|
import { a as getRawRuntimeEnv } from "../env-raw-Cx8ElDdj.mjs";
|
|
2
4
|
import { getRuntimeEnv, isInternalBinding } from "./env.mjs";
|
|
3
|
-
import { boolean, email, getSecretOverride, json, number, oneOf, string, url } from "./env-helpers.mjs";
|
|
4
|
-
//#region src/shared/env-mask.ts
|
|
5
|
-
/**
|
|
6
|
-
* Secret redaction helpers for env-validation output.
|
|
7
|
-
*
|
|
8
|
-
* Values are redacted (replaced with `<redacted>`) whenever they flow into
|
|
9
|
-
* a user-visible string — `EnvValidationError` messages, CLI reports, the
|
|
10
|
-
* dev-server warning block. The key name is never masked (the user needs
|
|
11
|
-
* it to locate the offending entry).
|
|
12
|
-
*
|
|
13
|
-
* Redaction is belt-and-braces:
|
|
14
|
-
* 1. An explicit `.secret()` / `.public()` flag on a schema entry wins.
|
|
15
|
-
* 2. Otherwise, a key-name regex (`KEY|TOKEN|SECRET|…`) redacts anything
|
|
16
|
-
* that looks like credentials.
|
|
17
|
-
* 3. Even on non-secret keys, a value that itself looks high-entropy
|
|
18
|
-
* (`sk_…`, `ghp_…`, ≥24 characters of mixed alphanumerics) is redacted
|
|
19
|
-
* — catches wrong-file typos like `PORT=sk_live_abc123`.
|
|
20
|
-
*
|
|
21
|
-
* Users can opt out of the guard for local debugging via
|
|
22
|
-
* `VOID_ENV_UNMASK=1` in the environment; that path prints a one-shot
|
|
23
|
-
* notice on stderr so the loosened output is visibly attributed.
|
|
24
|
-
*
|
|
25
|
-
* This module is a leaf — no imports from non-leaf modules, safe to reach
|
|
26
|
-
* from both the runtime (worker bundle) and the CLI host.
|
|
27
|
-
*/
|
|
28
|
-
/** Sentinel emitted in place of a redacted value. */
|
|
29
|
-
const REDACTED = "<redacted>";
|
|
30
|
-
/** Environment variable that disables redaction when set to `1`. */
|
|
31
|
-
const UNMASK_ENV_VAR = "VOID_ENV_UNMASK";
|
|
32
|
-
/**
|
|
33
|
-
* Regex matching env key names that almost always carry secrets.
|
|
34
|
-
* Case-insensitive; matched as a substring anywhere in the key.
|
|
35
|
-
*/
|
|
36
|
-
const SECRET_KEY_RE = /KEY|TOKEN|SECRET|PASSWORD|PASS(WD)?|CREDENTIAL|PRIVATE|AUTH|BEARER|APIKEY|DSN/i;
|
|
37
|
-
/** Common secret value prefixes (Stripe, GitHub, Slack, AWS, …). */
|
|
38
|
-
const SECRET_VALUE_PREFIX_RE = /^(sk|pk|ghp|xoxb|AKIA)/i;
|
|
39
|
-
/** High-entropy alphanumeric string of ≥24 chars. */
|
|
40
|
-
const HIGH_ENTROPY_RE = /^[A-Za-z0-9_\-+/=.:]{24,}$/;
|
|
41
|
-
/** `true` when the key name heuristically denotes a secret. */
|
|
42
|
-
function isLikelySecretKey(name) {
|
|
43
|
-
return SECRET_KEY_RE.test(name);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* `true` when the value looks like a credential regardless of key name.
|
|
47
|
-
* Err on the side of redacting — a false positive hides one non-secret
|
|
48
|
-
* debugging hint, a false negative pastes a token into a GitHub issue.
|
|
49
|
-
*/
|
|
50
|
-
function isLikelySecretValue(value) {
|
|
51
|
-
if (typeof value !== "string" || value.length === 0) return false;
|
|
52
|
-
return SECRET_VALUE_PREFIX_RE.test(value) || HIGH_ENTROPY_RE.test(value);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Redact every occurrence of `raw` inside a validator-produced `message`
|
|
56
|
-
* when the key should be masked. Built-in helpers embed the raw value in
|
|
57
|
-
* their error strings (e.g. `Expected a number, got "not-a-number"`); we
|
|
58
|
-
* scrub those after the fact so third-party Standard Schema libraries —
|
|
59
|
-
* which have their own message format — also get reasonable redaction as
|
|
60
|
-
* long as the offending value was a secret-looking literal.
|
|
61
|
-
*/
|
|
62
|
-
function redactMessage(key, rawValue, message, options = {}) {
|
|
63
|
-
if (options.unmask) return message;
|
|
64
|
-
if (!(options.override === "secret" || options.override !== "public" && (isLikelySecretKey(key) || isLikelySecretValue(rawValue)))) return message;
|
|
65
|
-
if (typeof rawValue !== "string" || rawValue.length === 0) return message;
|
|
66
|
-
return message.split(rawValue).join(REDACTED);
|
|
67
|
-
}
|
|
68
|
-
let unmaskResolved = null;
|
|
69
|
-
let unmaskNoticeShown = false;
|
|
70
|
-
/**
|
|
71
|
-
* Resolve the effective unmask flag, consulting `process.env` exactly once
|
|
72
|
-
* per process. On the first affirmative read, we print a one-shot notice to
|
|
73
|
-
* stderr so CI logs clearly show the guard is off.
|
|
74
|
-
*/
|
|
75
|
-
function isUnmaskActive() {
|
|
76
|
-
if (unmaskResolved !== null) return unmaskResolved;
|
|
77
|
-
let active = false;
|
|
78
|
-
try {
|
|
79
|
-
active = globalThis.process?.env?.[UNMASK_ENV_VAR] === "1";
|
|
80
|
-
} catch {
|
|
81
|
-
active = false;
|
|
82
|
-
}
|
|
83
|
-
unmaskResolved = active;
|
|
84
|
-
if (active && !unmaskNoticeShown) {
|
|
85
|
-
unmaskNoticeShown = true;
|
|
86
|
-
try {
|
|
87
|
-
console.error(`[void/env] ${UNMASK_ENV_VAR}=1 is set — env validation errors will include raw values. Unset it before sharing logs.`);
|
|
88
|
-
} catch {}
|
|
89
|
-
}
|
|
90
|
-
return active;
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
5
|
//#region src/runtime/env-public.ts
|
|
94
6
|
/**
|
|
95
7
|
* Public env API — `void/env`.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-
|
|
2
|
+
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-Cjh8uM3Y.mjs";
|
|
3
3
|
export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|
package/dist/runtime/live.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
2
|
import { r as AuthUser } from "../auth-qgMlYp7Z.mjs";
|
|
3
|
-
import { a as CloudEnv, r as CloudContext } from "../handler-
|
|
3
|
+
import { a as CloudEnv, r as CloudContext } from "../handler-Cjh8uM3Y.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/live.d.ts
|
|
6
6
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-
|
|
1
|
+
import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-Cjh8uM3Y.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AuthState } from "../auth-qgMlYp7Z.mjs";
|
|
2
|
-
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-
|
|
2
|
+
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-DealXecJ.mjs";
|
|
3
3
|
import { AnyWebSocketDefinition } from "./ws.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/ws-server.d.ts
|
package/dist/runtime/ws.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as AuthUser } from "../auth-qgMlYp7Z.mjs";
|
|
2
1
|
import { t as StandardSchemaV1 } from "../standard-schema-DJ0HW7QP.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { r as AuthUser } from "../auth-qgMlYp7Z.mjs";
|
|
3
|
+
import { a as CloudEnv } from "../handler-Cjh8uM3Y.mjs";
|
|
4
4
|
import { WebSocketRouteMap } from "void/routes";
|
|
5
5
|
|
|
6
6
|
//#region src/runtime/ws.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, n as dirname, r as extname, t as basename } from "./
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join, n as dirname, r as extname, t as basename } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
3
3
|
import { t as glob } from "./dist-BuiRJkTd.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/router/parse-filename.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, t as basename } from "./
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join, i as isAbsolute, t as basename } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
3
3
|
import { n as globSync, t as glob } from "./dist-BuiRJkTd.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-
|
|
4
|
+
import { c as isIdentifier, d as isObjectExpression, l as isLiteral, s as isCallExpression } from "./entry-D7yy4xVH.mjs";
|
|
5
|
+
import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-DEwlM_Xy.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
import { parseSync } from "vite";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as outro, E as note, O as password, S as confirm, T as log, a as cliTitle, j as isCancel, w as intro, x as cancel } from "./agents-
|
|
2
|
-
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
1
|
+
import { D as outro, E as note, O as password, S as confirm, T as log, a as cliTitle, j as isCancel, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BBMtLLV9.mjs";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/secret.ts
|
|
6
6
|
async function runSecretCommand(root, args) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, s as relative } from "./
|
|
2
|
-
import { T as log, r as getPackageDir } from "./agents-
|
|
1
|
+
import { a as join, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { T as log, r as getPackageDir } from "./agents-CtgBYqld.mjs";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, readdirSync, readlinkSync, symlinkSync } from "node:fs";
|
|
4
4
|
//#region src/cli/skills.ts
|
|
5
5
|
function parseSkills(skillsDir) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as S_RADIO_ACTIVE, b as S_STEP_SUBMIT, g as S_CHECKBOX_INACTIVE, h as S_CHECKBOX_ACTIVE, m as S_BAR_END, p as S_BAR, u as import_picocolors, v as S_RADIO_INACTIVE, y as S_STEP_ACTIVE } from "./agents-
|
|
1
|
+
import { _ as S_RADIO_ACTIVE, b as S_STEP_SUBMIT, g as S_CHECKBOX_INACTIVE, h as S_CHECKBOX_ACTIVE, m as S_BAR_END, p as S_BAR, u as import_picocolors, v as S_RADIO_INACTIVE, y as S_STEP_ACTIVE } from "./agents-CtgBYqld.mjs";
|
|
2
2
|
//#region src/cli/subcommand-prompt.ts
|
|
3
3
|
function promptSubcommand(command, subcommands) {
|
|
4
4
|
return new Promise((resolve) => {
|
package/dist/sveltekit.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, c as resolve, i as isAbsolute, s as relative } from "./
|
|
1
|
+
import { a as join, c as resolve, i as isAbsolute, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
//#region src/sveltekit.ts
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
-
import { a as join, n as dirname } from "./
|
|
2
|
+
import { a as join, n as dirname } from "./dist-DaKKDf8D.mjs";
|
|
3
3
|
import { t as canonicalJson } from "./canonical-json-DuDiiUsQ.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
@@ -15,11 +15,13 @@ At the end of the interactive flow, `void init` can also log you in and link or
|
|
|
15
15
|
|
|
16
16
|
void deploy
|
|
17
17
|
|
|
18
|
+
To deploy to your OWN Cloudflare account instead of the Void platform, use `void deploy --backend cloudflare` (add `--provision` on the first deploy to create the D1/KV/R2/Queues/Hyperdrive resources your app needs). Pin an account first (`account_id` in `wrangler.jsonc` or `CLOUDFLARE_ACCOUNT_ID`) and keep real secrets in `wrangler secret put` — `.env` values ship as plaintext worker vars. v1 deploys full Void apps on the Cloudflare Workers target only (D1/KV/R2/Queues/Hyperdrive; auth and ISR on D1/SQLite); framework SSR of every kind (TanStack Start, React Router, vinext, SvelteKit, Nuxt, Analog, Astro), static/SPA/SSG apps (including output: "static"), WebSocket/Durable Object apps (*.ws.ts), a custom migrations_pattern, node/bun/deno targets, and PostgreSQL apps with auth all fail closed with guidance, and auth apps need checked-in migrations that produce the Better Auth schema. `--provision` is a single-operator, dev-machine step and is disabled in CI.
|
|
19
|
+
|
|
18
20
|
Database workflow: define Drizzle tables in `db/schema.ts`, import `db` from `void/db` and tables from `@schema`. Use `void db push` to prototype (applies schema directly, no migration files). Use `void db generate` when ready to create production migration files in `db/migrations/`. `drizzle-orm` and `drizzle-kit` ship with void — no extra install needed. Scaffold new tables with `void gen model <name> [columns...]`.
|
|
19
21
|
|
|
20
22
|
Routing extras: declare static redirects/rewrites/fallbacks in `void.json` under `routing.*`, or in a `public/_redirects` file. For dynamic rewrites, call `c.rewrite(path)` in a `defineMiddleware`.
|
|
21
23
|
|
|
22
|
-
Logs: surface app-level errors via `import { logger } from "void/log"` and `logger.error(msg, fields?)` (also `.warn` / `.info`) so they appear under `void project logs --level error`. Errors only persisted to your own DB are invisible to Cloudflare Tail.
|
|
24
|
+
Logs: surface app-level errors via `import { logger } from "void/log"` and `logger.error(msg, fields?)` (also `.warn` / `.info`) so they appear under `void project logs --level error`. Errors only persisted to your own DB are invisible to Cloudflare Tail. Logs only exist where a worker ran — for 5xx generated by the edge router or on static/SPA projects, use `void project requests --status 5xx` instead.
|
|
23
25
|
|
|
24
26
|
CI / fresh clones: run `void prepare` after install to generate `.void/routes.d.ts`, `.void/db.d.ts`, `.void/queues.d.ts`, `.void/env.d.ts`, and `.void/tsconfig.json` without booting Vite. `vite dev` / `vite build` populate these during normal app workflows.
|
|
25
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "void",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/voidzero-dev/void.git",
|
|
@@ -327,6 +327,7 @@
|
|
|
327
327
|
"ignore": "^7.0.5",
|
|
328
328
|
"jsonc-parser": "3.3.1",
|
|
329
329
|
"pg": "8.22.0",
|
|
330
|
+
"proper-lockfile": "^4.1.2",
|
|
330
331
|
"wrangler": "^4.107.0"
|
|
331
332
|
},
|
|
332
333
|
"devDependencies": {
|
|
@@ -335,12 +336,13 @@
|
|
|
335
336
|
"@types/better-sqlite3": "^7.6.13",
|
|
336
337
|
"@types/node": "^26.1.0",
|
|
337
338
|
"@types/pg": "^8.20.0",
|
|
339
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
338
340
|
"@typescript/native-preview": "7.0.0-dev.20260507.1",
|
|
339
341
|
"arktype": "^2.2.2",
|
|
340
342
|
"estree-walker": "^3.0.3",
|
|
341
343
|
"magic-string": "^0.30.21",
|
|
342
344
|
"ofetch": "2.0.0-alpha.3",
|
|
343
|
-
"
|
|
345
|
+
"pathslash": "^0.1.0",
|
|
344
346
|
"pglite-server": "0.1.5",
|
|
345
347
|
"picocolors": "^1.1.1",
|
|
346
348
|
"tinyglobby": "^0.2.17",
|
|
@@ -354,7 +356,7 @@
|
|
|
354
356
|
"valibot": ">=1.0.0-beta.7",
|
|
355
357
|
"vite": "^8.0.0",
|
|
356
358
|
"zod": "^3.25.0 || ^4.0.0",
|
|
357
|
-
"@void/md": "0.10.
|
|
359
|
+
"@void/md": "0.10.12"
|
|
358
360
|
},
|
|
359
361
|
"peerDependenciesMeta": {
|
|
360
362
|
"@void/md": {
|
package/schema.json
CHANGED
|
@@ -144,6 +144,11 @@
|
|
|
144
144
|
"type": "object",
|
|
145
145
|
"description": "Routing configuration — headers, redirects, rewrites, fallbacks, revalidation, prerendering.",
|
|
146
146
|
"properties": {
|
|
147
|
+
"notFound": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"enum": ["single-page-application", "404-page", "none"],
|
|
150
|
+
"description": "Override how the asset layer answers a request that matched no asset and no worker route. Void infers \"single-page-application\" when the worker does not own HTML routing; set \"404-page\" for a static-site-generator build so unknown URLs serve 404.html with a real HTTP 404 instead of index.html with a 200. Does not change run_worker_first. Ignored for SvelteKit, Nuxt, Analog, and Astro deploys, which pin not_found_handling to \"none\" because the framework's own worker owns unmatched HTML."
|
|
151
|
+
},
|
|
147
152
|
"revalidate": {
|
|
148
153
|
"description": "Edge caching TTL in seconds. A number sets a global TTL for all SSR pages. An object maps URL patterns to TTLs (first match wins). Set to 0 to disable caching for a path.",
|
|
149
154
|
"oneOf": [
|
package/skills/void/SKILL.md
CHANGED
|
@@ -32,39 +32,40 @@ Then ask what to do next.
|
|
|
32
32
|
|
|
33
33
|
## Task Routing
|
|
34
34
|
|
|
35
|
-
| User intent
|
|
36
|
-
|
|
|
37
|
-
| CLI command syntax, flags, env vars
|
|
38
|
-
| Initial setup, onboarding, first app
|
|
39
|
-
| App type detection and mode behavior
|
|
40
|
-
| Server/API routing and middleware
|
|
41
|
-
| Pages mode, loader/action, forms, layouts
|
|
42
|
-
| Database and migrations
|
|
43
|
-
| Typed fetch and end-to-end typing
|
|
44
|
-
| Authentication
|
|
45
|
-
| Cloudflare runtime bindings and config
|
|
46
|
-
| AI inference (Workers AI, providers)
|
|
47
|
-
| KV / storage / queues / cron jobs
|
|
48
|
-
| SSR and caching
|
|
49
|
-
| Rewrites, redirects, fallbacks
|
|
50
|
-
| Static site generation
|
|
51
|
-
| Deployment and CI
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
35
|
+
| User intent | Docs file(s) |
|
|
36
|
+
| ------------------------------------------ | ----------------------------------------------------------------------------------------- |
|
|
37
|
+
| CLI command syntax, flags, env vars | `docs/reference/cli.md` |
|
|
38
|
+
| Initial setup, onboarding, first app | `docs/guide/quickstart.md`, `docs/reference/cli.md` |
|
|
39
|
+
| App type detection and mode behavior | `docs/guide/app-types.md`, `docs/reference/config.md` |
|
|
40
|
+
| Server/API routing and middleware | `docs/guide/server-routing.md`, `docs/integrations/hono.md` |
|
|
41
|
+
| Pages mode, loader/action, forms, layouts | `docs/guide/pages-routing/*.md`, `docs/guide/type-safety.md` |
|
|
42
|
+
| Database and migrations | `docs/guide/database.md`, `docs/guide/type-safety.md` |
|
|
43
|
+
| Typed fetch and end-to-end typing | `docs/guide/typed-fetch.md`, `docs/guide/type-safety.md` |
|
|
44
|
+
| Authentication | `docs/guide/auth.md`, `docs/guide/env-vars.md` |
|
|
45
|
+
| Cloudflare runtime bindings and config | `docs/integrations/cloudflare.md`, `docs/reference/config.md`, `docs/guide/env-vars.md` |
|
|
46
|
+
| AI inference (Workers AI, providers) | `docs/guide/ai.md` |
|
|
47
|
+
| KV / storage / queues / cron jobs | `docs/guide/kv.md`, `docs/guide/storage.md`, `docs/guide/queues.md`, `docs/guide/jobs.md` |
|
|
48
|
+
| SSR and caching | `docs/guide/ssr.md`, `docs/guide/edge/*.md` |
|
|
49
|
+
| Rewrites, redirects, fallbacks | `docs/guide/edge/rewrites.md`, `docs/guide/edge/redirects.md`, `docs/reference/config.md` |
|
|
50
|
+
| Static site generation | `docs/guide/ssg.md` |
|
|
51
|
+
| Deployment and CI | `docs/guide/deployment.md`, `docs/reference/cli.md` |
|
|
52
|
+
| Self-host deploy to own Cloudflare account | `docs/integrations/cloudflare.md`, `docs/reference/cli.md` |
|
|
53
|
+
| Project status, deployment history | `docs/reference/cli.md` |
|
|
54
|
+
| Cache purging | `docs/reference/cli.md` |
|
|
55
|
+
| Project logs, runtime errors | `docs/reference/cli.md` |
|
|
56
|
+
| Secrets management (put/sync/delete) | `docs/reference/cli.md`, `docs/guide/env-vars.md` |
|
|
57
|
+
| Typed env vars (`defineEnv`, `env.ts`) | `docs/guide/env-vars.md` |
|
|
58
|
+
| Custom domain setup | `docs/reference/cli.md` |
|
|
59
|
+
| Database status, reset, seed, export | `docs/reference/cli.md`, `docs/guide/database.md` |
|
|
60
|
+
| Auth login/logout/whoami | `docs/reference/cli.md` |
|
|
61
|
+
| Overview / introduction | `docs/guide/index.md` |
|
|
62
|
+
| API surface details | `docs/reference/api.md` |
|
|
63
|
+
| Meta framework integration | `docs/integrations/frameworks/*.md` |
|
|
64
|
+
| Coding agent setup | `docs/integrations/agents.md` |
|
|
65
|
+
| Node.js / Bun / Deno targets | `docs/integrations/nodejs-bun-deno.md` |
|
|
66
|
+
| ORMs and external databases | `docs/integrations/orms-and-external-dbs.md` |
|
|
67
|
+
| Project structure and conventions | `docs/reference/structure.md` |
|
|
68
|
+
| Resource/binding inference | `docs/reference/resource-inference.md` |
|
|
68
69
|
|
|
69
70
|
## Working Rules
|
|
70
71
|
|