void 0.9.3 → 0.10.1
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/{auth-cmd-CPkWrQR9.mjs → auth-cmd-DBnbrX9Y.mjs} +2 -2
- package/dist/{better-auth-shared-CmEQZs1T.d.mts → better-auth-shared-a7H3wk9J.d.mts} +2 -2
- package/dist/{cache-1SVxZ7BK.mjs → cache-DNX0hLsO.mjs} +1 -1
- package/dist/{cancel-deploy-JaFClLr7.mjs → cancel-deploy-CDzkVaYZ.mjs} +1 -1
- package/dist/cli/cli.mjs +205 -36
- package/dist/{client-DIfOFf1W.mjs → client-D4awzTnj.mjs} +149 -45
- package/dist/{create-project-DCUrFJxa.mjs → create-project-CGodxfzH.mjs} +1 -1
- package/dist/{db-UW4IYQFw.mjs → db-ERzz4oly.mjs} +14 -14
- package/dist/{delete-CYknzwXU.mjs → delete-CJZGDLBR.mjs} +1 -1
- package/dist/{deploy-RQXpVBL-.mjs → deploy-Cwa5sooV.mjs} +74 -102
- package/dist/{domain-B7RntQ1r.mjs → domain-WvoAHE6w.mjs} +1 -1
- package/dist/{env-C_ZcxxED.mjs → env-Cx4czPsR.mjs} +1 -1
- package/dist/{env-helpers-Bd2wVdxz.d.mts → env-helpers-ZatKyjen.d.mts} +1 -1
- package/dist/{gen-O5mXZ76K.mjs → gen-Dgi4D7GC.mjs} +1 -1
- package/dist/git-metadata-Ce0AtSZL.mjs +82 -0
- package/dist/github-cmd-CUB041gj.mjs +308 -0
- package/dist/{handler-hm9KldPP.d.mts → handler-DczZlaXR.d.mts} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +18 -18
- package/dist/{init-DGrLx2ls.mjs → init-DvaRDMIc.mjs} +122 -77
- package/dist/{link-7MoXUMaI.mjs → link-CpbWJY3P.mjs} +2 -2
- package/dist/{list-N2mCHv8q.mjs → list-BkwE5vH4.mjs} +1 -1
- package/dist/{login-tt1OmNVg.mjs → login-Ca6mhQVI.mjs} +1 -1
- package/dist/{logs-Cl7q2CjZ.mjs → logs-ArQzZquo.mjs} +1 -1
- package/dist/{mcp-BXD35N2J.mjs → mcp-Cc2MMXdQ.mjs} +1 -1
- package/dist/{node-Df8UjQ2H.mjs → node-B07cZs0d.mjs} +3 -3
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +1 -0
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/{plugin-inference--7geW5Z2.mjs → plugin-inference-C3fLzFvP.mjs} +2 -0
- package/dist/{prepare-DT-7QII_.mjs → prepare-DH2WnEpD.mjs} +3 -3
- package/dist/{preset-2aBxMfY1.mjs → preset-B7ZQZn0u.mjs} +2 -2
- package/dist/{project-cmd-CLrqSbqj.mjs → project-cmd-CWZeawuN.mjs} +8 -8
- package/dist/{protocol-B9GZA4Bn.d.mts → protocol-63PHtCHS.d.mts} +3 -3
- package/dist/{rollback-CEbAwbHK.mjs → rollback-BJ60ktsW.mjs} +1 -1
- package/dist/{runner-DLZ9E_cX.mjs → runner-BQyKUqAL.mjs} +1 -1
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +3 -3
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +1 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/{scan-B2H1Vo2C.mjs → scan-DGEp1-1Q.mjs} +17 -9
- package/dist/{secret-C_uTY7xx.mjs → secret-BRbXyu7E.mjs} +1 -1
- package/package.json +2 -2
- package/schema.json +3 -3
- package/skills/void/docs/guide/deployment.md +37 -11
- package/skills/void/docs/guide/edge/headers.md +10 -3
- package/skills/void/docs/guide/edge/rewrites.md +5 -5
- package/skills/void/docs/reference/cli.md +65 -2
- /package/dist/{auth-migrations-CuQkjjWE.mjs → auth-migrations-BP-hMzYl.mjs} +0 -0
- /package/dist/{auth-CDeb2XAl.d.mts → auth-nEUVHuFI.d.mts} +0 -0
- /package/dist/{better-auth-shared-QAfk8CAS.mjs → better-auth-shared-D0Mbmx5V.mjs} +0 -0
- /package/dist/{defer-CouVukrf.mjs → defer-C-bdSM_b.mjs} +0 -0
- /package/dist/{drizzle-DYstYz0j.mjs → drizzle-DqstQTGq.mjs} +0 -0
- /package/dist/{env-raw-RDkMnSTC.mjs → env-raw-Dtj1UAoK.mjs} +0 -0
- /package/dist/{fetch-error-CimrygMq.d.mts → fetch-error-BQMdPvge.d.mts} +0 -0
- /package/dist/{fetch-error-BFIoojjf.mjs → fetch-error-C6qffTl2.mjs} +0 -0
- /package/dist/{head-BsSTGnIe.d.mts → head-JAH2l3fg.d.mts} +0 -0
- /package/dist/{headers-VkAnACKX.mjs → headers-BNWymgnH.mjs} +0 -0
- /package/dist/{package-json-B2TD0JLu.mjs → package-json-Bg_GJdJB.mjs} +0 -0
- /package/dist/{pg-CMZ_5wsC.mjs → pg-CempqvEJ.mjs} +0 -0
- /package/dist/{providers-3Kkv63Ha.d.mts → providers-BkiAlEad.d.mts} +0 -0
- /package/dist/{runner-pg-Cv9V7ydr.mjs → runner-pg-BAheiT6v.mjs} +0 -0
- /package/dist/{skills-BRKc--As.mjs → skills--OMgLmXW.mjs} +0 -0
- /package/dist/{standard-schema-Dnsh2vnl.d.mts → standard-schema-BCBv-QaP.d.mts} +0 -0
- /package/dist/{subcommand-prompt-OD-x_Tsm.mjs → subcommand-prompt-ClwpLlKD.mjs} +0 -0
- /package/dist/{types-DEWCqHtl.d.mts → types-BnHMXezo.d.mts} +0 -0
- /package/dist/{yarn-pnp-0SwYgQxx.mjs → yarn-pnp-DhCHHLAz.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-C6qffTl2.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client-svelte.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-nEUVHuFI.mjs";
|
|
2
2
|
import { auth, createAuthClient } from "./auth-client-vue.mjs";
|
|
3
|
-
import { t as FetchError } from "../fetch-error-
|
|
3
|
+
import { t as FetchError } from "../fetch-error-BQMdPvge.mjs";
|
|
4
4
|
import { fetch } from "./fetch.mjs";
|
|
5
5
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
6
6
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-C6qffTl2.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client-vue.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-nEUVHuFI.mjs";
|
|
2
2
|
import { auth, createAuthClient } from "./auth-client.mjs";
|
|
3
|
-
import { t as FetchError } from "../fetch-error-
|
|
3
|
+
import { t as FetchError } from "../fetch-error-BQMdPvge.mjs";
|
|
4
4
|
import { fetch } from "./fetch.mjs";
|
|
5
5
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
6
6
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
package/dist/runtime/client.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-C6qffTl2.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getSecretOverride, c as oneOf, i as email, l as string, n as SECRET_OVERRIDE_SYMBOL, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-
|
|
1
|
+
import { a as getSecretOverride, c as oneOf, i as email, l as string, n as SECRET_OVERRIDE_SYMBOL, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-ZatKyjen.mjs";
|
|
2
2
|
export { EnvSchema, SECRET_OVERRIDE_SYMBOL, boolean, email, getSecretOverride, json, number, oneOf, string, url };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-ZatKyjen.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/env-public-client.d.ts
|
|
4
4
|
declare const env: Record<string, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { t as StandardSchemaV1 } from "../standard-schema-
|
|
3
|
-
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-
|
|
2
|
+
import { t as StandardSchemaV1 } from "../standard-schema-BCBv-QaP.mjs";
|
|
3
|
+
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-ZatKyjen.mjs";
|
|
4
4
|
import * as _$_cloudflare_sandbox0 from "@cloudflare/sandbox";
|
|
5
5
|
|
|
6
6
|
//#region src/runtime/env-public.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getRawRuntimeEnv } from "../env-raw-
|
|
1
|
+
import { i as getRawRuntimeEnv } from "../env-raw-Dtj1UAoK.mjs";
|
|
2
2
|
import { getRuntimeEnv } from "./env.mjs";
|
|
3
3
|
import { boolean, email, getSecretOverride, json, number, oneOf, string, url } from "./env-helpers.mjs";
|
|
4
4
|
//#region src/shared/env-mask.ts
|
package/dist/runtime/env.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getRawRuntimeEnv, n as asEnv, r as envContext, t as INTERNAL_BINDING_PREFIXES } from "../env-raw-
|
|
1
|
+
import { i as getRawRuntimeEnv, n as asEnv, r as envContext, t as INTERNAL_BINDING_PREFIXES } from "../env-raw-Dtj1UAoK.mjs";
|
|
2
2
|
//#region src/runtime/env.ts
|
|
3
3
|
/**
|
|
4
4
|
* Public runtime env API — exposed via "void/_env".
|
package/dist/runtime/fetch.d.mts
CHANGED
package/dist/runtime/fetch.mjs
CHANGED
|
@@ -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-DczZlaXR.mjs";
|
|
3
3
|
export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, Deferred, HandlerInput, InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|
package/dist/runtime/handler.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { convertReturnValue } from "./response.mjs";
|
|
2
2
|
import { runValidation } from "./validator.mjs";
|
|
3
|
-
import { i as ValidationError, n as defer } from "../defer-
|
|
3
|
+
import { i as ValidationError, n as defer } from "../defer-C-bdSM_b.mjs";
|
|
4
4
|
//#region src/runtime/handler.ts
|
|
5
5
|
/**
|
|
6
6
|
* Thrown when `c.rewrite()` is called with a destination whose final path
|
package/dist/runtime/isr.mjs
CHANGED
package/dist/runtime/live.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { r as AuthUser } from "../auth-
|
|
3
|
-
import { a as CloudEnv, r as CloudContext } from "../handler-
|
|
2
|
+
import { r as AuthUser } from "../auth-nEUVHuFI.mjs";
|
|
3
|
+
import { a as CloudEnv, r as CloudContext } from "../handler-DczZlaXR.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/live.d.ts
|
|
6
6
|
type MaybePromise<T> = T | Promise<T>;
|
package/dist/runtime/live.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as disablePgPassFallback } from "../pg-
|
|
1
|
+
import { t as disablePgPassFallback } from "../pg-CempqvEJ.mjs";
|
|
2
2
|
//#region src/runtime/migration-handler-pg.ts
|
|
3
3
|
function createMigrationHandler(env, migrations, _dialect, runAuthMigrations) {
|
|
4
4
|
return async (request) => {
|
package/dist/runtime/sandbox.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getRawRuntimeEnv } from "../env-raw-
|
|
1
|
+
import { i as getRawRuntimeEnv } from "../env-raw-Dtj1UAoK.mjs";
|
|
2
2
|
import { requireRuntimeBinding } from "./env.mjs";
|
|
3
3
|
import { Sandbox, getSandbox as getSandbox$1 } from "@cloudflare/sandbox";
|
|
4
4
|
//#region src/runtime/sandbox.ts
|
|
@@ -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-DczZlaXR.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as AuthState } from "../auth-
|
|
2
|
-
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-
|
|
1
|
+
import { n as AuthState } from "../auth-nEUVHuFI.mjs";
|
|
2
|
+
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-a7H3wk9J.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-
|
|
2
|
-
import { t as StandardSchemaV1 } from "../standard-schema-
|
|
3
|
-
import { a as CloudEnv } from "../handler-
|
|
1
|
+
import { r as AuthUser } from "../auth-nEUVHuFI.mjs";
|
|
2
|
+
import { t as StandardSchemaV1 } from "../standard-schema-BCBv-QaP.mjs";
|
|
3
|
+
import { a as CloudEnv } from "../handler-DczZlaXR.mjs";
|
|
4
4
|
import { WebSocketRouteMap } from "void/routes";
|
|
5
5
|
|
|
6
6
|
//#region src/runtime/ws.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, t as basename } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
|
|
3
3
|
import { n as globSync, t as glob } from "./dist-5cGIJHQQ.mjs";
|
|
4
|
-
import { d as isCallExpression, f as isIdentifier, h as isObjectExpression, p as isLiteral } from "./plugin-inference
|
|
4
|
+
import { d as isCallExpression, f as isIdentifier, h as isObjectExpression, p as isLiteral } from "./plugin-inference-C3fLzFvP.mjs";
|
|
5
5
|
import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-VCAM1oh3.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { parseSync } from "vite";
|
|
@@ -147,6 +147,7 @@ function detectHttpExports(absPath) {
|
|
|
147
147
|
const program = parsed.program;
|
|
148
148
|
for (const node of program.body ?? []) if (node.type === "ExportNamedDeclaration") {
|
|
149
149
|
const declarationNode = node;
|
|
150
|
+
if (declarationNode.exportKind === "type") continue;
|
|
150
151
|
const decl = declarationNode.declaration;
|
|
151
152
|
if (decl) {
|
|
152
153
|
if (decl.type === "VariableDeclaration") {
|
|
@@ -157,6 +158,7 @@ function detectHttpExports(absPath) {
|
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
if (declarationNode.specifiers) for (const spec of declarationNode.specifiers) {
|
|
161
|
+
if (spec.exportKind === "type") continue;
|
|
160
162
|
const exported = isIdentifier(spec.exported) ? spec.exported.name : isIdentifier(spec.local) ? spec.local.name : void 0;
|
|
161
163
|
if (exported && HTTP_METHODS.has(exported)) methods.push(exported);
|
|
162
164
|
}
|
|
@@ -286,6 +288,18 @@ function parseMiddlewareDefinitions(files) {
|
|
|
286
288
|
};
|
|
287
289
|
}).sort((a, b) => a.order - b.order);
|
|
288
290
|
}
|
|
291
|
+
function compareRouteSpecificity(a, b) {
|
|
292
|
+
if (a.catchAll !== b.catchAll) return a.catchAll ? 1 : -1;
|
|
293
|
+
const aSegments = a.pattern.split("/");
|
|
294
|
+
const bSegments = b.pattern.split("/");
|
|
295
|
+
const shared = Math.min(aSegments.length, bSegments.length);
|
|
296
|
+
for (let i = 0; i < shared; i++) {
|
|
297
|
+
const aDynamic = aSegments[i].startsWith(":") || aSegments[i] === "*";
|
|
298
|
+
if (aDynamic !== (bSegments[i].startsWith(":") || bSegments[i] === "*")) return aDynamic ? 1 : -1;
|
|
299
|
+
if (aSegments[i] !== bSegments[i]) return aSegments[i].localeCompare(bSegments[i]);
|
|
300
|
+
}
|
|
301
|
+
return aSegments.length - bSegments.length;
|
|
302
|
+
}
|
|
289
303
|
/**
|
|
290
304
|
* Scan routes/ and middleware/ directories and return a structured manifest.
|
|
291
305
|
* Files starting with _ are ignored.
|
|
@@ -315,10 +329,7 @@ async function scanRoutes(root, options) {
|
|
|
315
329
|
const route = parseRouteFilename(f);
|
|
316
330
|
route.methods = detectHttpExports(join(routesDir, f));
|
|
317
331
|
return route;
|
|
318
|
-
}).sort(
|
|
319
|
-
if (a.catchAll !== b.catchAll) return a.catchAll ? 1 : -1;
|
|
320
|
-
return a.pattern.localeCompare(b.pattern);
|
|
321
|
-
}),
|
|
332
|
+
}).sort(compareRouteSpecificity),
|
|
322
333
|
websockets,
|
|
323
334
|
middleware: parseMiddlewareDefinitions(middlewareFiles),
|
|
324
335
|
jobs,
|
|
@@ -348,10 +359,7 @@ function scanRoutePatternsSync(root, paths = readProjectPaths(root)) {
|
|
|
348
359
|
} catch {
|
|
349
360
|
routeFiles = [];
|
|
350
361
|
}
|
|
351
|
-
return routeFiles.filter((f) => !isWebSocketPatternFile(f)).filter((f) => !f.split("/").some((s) => s.startsWith("_"))).map((f) => parseRouteFilename(f)).sort(
|
|
352
|
-
if (a.catchAll !== b.catchAll) return a.catchAll ? 1 : -1;
|
|
353
|
-
return a.pattern.localeCompare(b.pattern);
|
|
354
|
-
});
|
|
362
|
+
return routeFiles.filter((f) => !isWebSocketPatternFile(f)).filter((f) => !f.split("/").some((s) => s.startsWith("_"))).map((f) => parseRouteFilename(f)).sort(compareRouteSpecificity);
|
|
355
363
|
}
|
|
356
364
|
//#endregion
|
|
357
365
|
export { scanQueuesSync as a, scanWebSocketRoutesSync as i, scanRoutePatternsSync as n, scanJobsSync as o, scanRoutes as r, scanMiddlewareSync as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { d as getToken, n as PlatformClient } from "./client-D4awzTnj.mjs";
|
|
3
3
|
import { _ as me, c as R, g as ge, n as Ce, u as Se, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
4
4
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
5
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "void",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/voidzero-dev/void.git",
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
"valibot": ">=1.0.0-beta.7",
|
|
354
354
|
"vite": "^8.0.0",
|
|
355
355
|
"zod": "^3.25.0 || ^4.0.0",
|
|
356
|
-
"@void/md": "0.
|
|
356
|
+
"@void/md": "0.10.1"
|
|
357
357
|
},
|
|
358
358
|
"peerDependenciesMeta": {
|
|
359
359
|
"@void/md": {
|
package/schema.json
CHANGED
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
{
|
|
155
155
|
"type": "object",
|
|
156
156
|
"patternProperties": {
|
|
157
|
-
"^(
|
|
157
|
+
"^(\\/|\\*$)": {
|
|
158
158
|
"type": "number",
|
|
159
159
|
"minimum": 0
|
|
160
160
|
}
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"type": "object",
|
|
217
217
|
"description": "URL rewrites. Keys are source URL patterns (path-only `/path` or host-scoped `https://host/path`); values are destination paths. Serves content from the destination without changing the browser URL. Destinations must start with \"/\" and must not contain \"?\" — the incoming request's query string is preserved automatically.",
|
|
218
218
|
"patternProperties": {
|
|
219
|
-
"^(/|https://)": { "type": "string", "pattern": "^/[^?]*$" }
|
|
219
|
+
"^(/|https://)": { "type": "string", "pattern": "^/(?!/)[^?]*$" }
|
|
220
220
|
},
|
|
221
221
|
"additionalProperties": false
|
|
222
222
|
},
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
"type": "object",
|
|
225
225
|
"description": "Fallback rewrites. Same shape as `rewrites`, but only fire when no static asset matched the request. Useful for SPA shells or default-locale catch-alls without pre-empting real routes. Destinations must start with \"/\" and must not contain \"?\".",
|
|
226
226
|
"patternProperties": {
|
|
227
|
-
"^(/|https://)": { "type": "string", "pattern": "^/[^?]*$" }
|
|
227
|
+
"^(/|https://)": { "type": "string", "pattern": "^/(?!/)[^?]*$" }
|
|
228
228
|
},
|
|
229
229
|
"additionalProperties": false
|
|
230
230
|
}
|
|
@@ -64,30 +64,56 @@ If your CI pipeline runs typechecking or other static analysis before deploy, ru
|
|
|
64
64
|
|
|
65
65
|
## GitHub Actions
|
|
66
66
|
|
|
67
|
-
You can deploy from a GitHub repo
|
|
67
|
+
You can deploy from a GitHub repo on every push to `main`. Running `void init --github` generates `.github/workflows/void-deploy.yml` in your project.
|
|
68
|
+
|
|
69
|
+
The workflow authenticates with [GitHub OIDC](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect) — there is **no long-lived `VOID_TOKEN` secret to store or rotate**. The job requests a short-lived OIDC token from GitHub, exchanges it at `POST $VOID_API_URL/auth/github-oidc` for a short-lived project-scoped deploy token (about 15 minutes on the free tier; longer on higher plans, capped at ~60 minutes), then runs `void deploy --project <slug>`:
|
|
68
70
|
|
|
69
71
|
```yaml
|
|
70
|
-
name: Deploy
|
|
72
|
+
name: Deploy to Void
|
|
71
73
|
on:
|
|
72
74
|
push:
|
|
73
75
|
branches: [main]
|
|
74
76
|
|
|
77
|
+
# Latest push wins: a newer commit cancels an in-flight deploy for the same
|
|
78
|
+
# repo + branch, so an older commit can never overtake a newer one.
|
|
79
|
+
concurrency:
|
|
80
|
+
group: void-deploy-${{ github.repository }}-${{ github.ref }}
|
|
81
|
+
cancel-in-progress: true
|
|
82
|
+
|
|
83
|
+
permissions:
|
|
84
|
+
id-token: write
|
|
85
|
+
contents: read
|
|
86
|
+
|
|
87
|
+
env:
|
|
88
|
+
VOID_API_URL: ${{ vars.VOID_API_URL || 'https://api.void.cloud' }}
|
|
89
|
+
VOID_PROJECT: my-app
|
|
90
|
+
|
|
75
91
|
jobs:
|
|
76
92
|
deploy:
|
|
77
93
|
runs-on: ubuntu-latest
|
|
78
94
|
steps:
|
|
79
|
-
- uses: actions/checkout@
|
|
80
|
-
- uses:
|
|
95
|
+
- uses: actions/checkout@v6
|
|
96
|
+
- uses: actions/setup-node@v6
|
|
81
97
|
with:
|
|
82
|
-
node-version:
|
|
83
|
-
cache:
|
|
84
|
-
- run:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
98
|
+
node-version: lts/*
|
|
99
|
+
cache: npm
|
|
100
|
+
- run: npm ci
|
|
101
|
+
- name: Exchange GitHub OIDC token for a Void deploy token
|
|
102
|
+
run: |
|
|
103
|
+
OIDC_TOKEN="$(curl -sf \
|
|
104
|
+
-H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
|
|
105
|
+
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=void" | jq -r '.value')"
|
|
106
|
+
VOID_TOKEN="$(curl -sf \
|
|
107
|
+
-H 'Content-Type: application/json' \
|
|
108
|
+
-d "$(jq -n --arg t "$OIDC_TOKEN" --arg p "$VOID_PROJECT" '{oidcToken: $t, project: $p}')" \
|
|
109
|
+
"$VOID_API_URL/auth/github-oidc" | jq -r '.token')"
|
|
110
|
+
echo "::add-mask::$VOID_TOKEN"
|
|
111
|
+
echo "VOID_TOKEN=$VOID_TOKEN" >> "$GITHUB_ENV"
|
|
112
|
+
- name: Deploy
|
|
113
|
+
run: npx void deploy --project "$VOID_PROJECT"
|
|
88
114
|
```
|
|
89
115
|
|
|
90
|
-
|
|
116
|
+
Connect the repository to your project once with `void github connect <project> --repo <owner/repo> --executor github_actions` to authorize it. This GitHub Actions path requires the `github_actions` build executor — the default `container` executor will not work with this workflow. The exact steps vary by package manager (the scaffold detects pnpm, yarn, bun, or npm). The `VOID_PROJECT` value is baked in from your linked project when known; otherwise the workflow reads a `VOID_PROJECT` repository variable. To target staging, set a `VOID_API_URL` repository variable to `https://api.staging.void.cloud`.
|
|
91
117
|
|
|
92
118
|
## Other Targets
|
|
93
119
|
|
|
@@ -56,11 +56,18 @@ Define custom response headers in [`void.json`](../../reference/config) using th
|
|
|
56
56
|
|
|
57
57
|
## Scope
|
|
58
58
|
|
|
59
|
-
Header rules apply to **all responses** served through the dispatch worker, including static assets, SSR pages, and
|
|
59
|
+
Header rules apply to **all responses** served through the dispatch worker, including static assets, SSR pages, API routes, and hashed asset responses (which browsers fetch over `GET` from the immutable edge cache). Serving headers on hashed assets is what lets a cross-origin-isolated app attach `Cross-Origin-Embedder-Policy` and `Cross-Origin-Resource-Policy` to its hashed worker and wasm files — without them, a module worker spawned from a `require-corp` document is blocked.
|
|
60
|
+
|
|
61
|
+
On hashed (content-addressed, immutable) assets, rules are **additive**. You can add headers such as COOP/COEP/CORP or other security headers, but the platform-managed caching, representation, and framing headers are preserved so an immutable asset cannot be mis-cached or corrupted: `Cache-Control`, `Content-Type`, `Content-Encoding`, `Content-Length`, `Content-Range`, `Accept-Ranges`, and `Transfer-Encoding` keep their platform values even if a broad rule tries to overwrite them. (This is the one case where a user `Cache-Control` does not override the default.)
|
|
62
|
+
|
|
63
|
+
Header rules do not apply to:
|
|
60
64
|
|
|
61
|
-
- Hashed asset cache hits (these use immutable caching set by the dispatch worker itself)
|
|
62
65
|
- ISR cache responses (these have their own cache-control headers)
|
|
63
66
|
|
|
67
|
+
### Blocked headers
|
|
68
|
+
|
|
69
|
+
Two headers can never be set through rules: `Set-Cookie` and `Clear-Site-Data`. On the shared `*.void.app` domain, `void.app` is the registrable domain, so a cookie operation from one project would reach every project's subdomain. Both are dropped from rule output to keep that tenant boundary intact.
|
|
70
|
+
|
|
64
71
|
## Framework `_headers` files
|
|
65
72
|
|
|
66
73
|
Meta-frameworks like SvelteKit, Nuxt, and Astro generate a `_headers` file with cache rules for their hashed asset directories. Void automatically parses this file during deploy and merges the rules into the deploy manifest.
|
|
@@ -74,6 +81,6 @@ No configuration is needed. If the framework generates a `_headers` file, it is
|
|
|
74
81
|
|
|
75
82
|
1. `void deploy` reads header rules from the framework `_headers` file (if present) and `routing.headers` in `void.json`, then includes them in the deploy manifest.
|
|
76
83
|
2. The platform stores the rules in the KV routing entry for your project.
|
|
77
|
-
3. The dispatch worker applies matching rules to matching responses before returning them.
|
|
84
|
+
3. The dispatch worker applies matching rules to matching responses before returning them. Most cacheable responses are cached with the final headers; hashed assets are the exception — their rules are applied on every serve (including cache hits), so a later header-rule change takes effect even when the content hash, and thus the cache entry, is unchanged.
|
|
78
85
|
|
|
79
86
|
Because rules are evaluated at the edge, there is no extra latency cost. Headers are applied inline before the response is returned and cached.
|
|
@@ -332,14 +332,14 @@ If you use [`routing.revalidate`](./revalidation) on a dispatch rewrite (`routin
|
|
|
332
332
|
During `vite dev`, every response carries an `X-Void-Routing` header that traces how the request was resolved. Open the Network tab in devtools and inspect the response headers:
|
|
333
333
|
|
|
334
334
|
```
|
|
335
|
-
X-Void-Routing: redirect[/old]
|
|
336
|
-
X-Void-Routing: rewrite[/api/*]
|
|
337
|
-
X-Void-Routing: fallback[/docs/*]
|
|
338
|
-
X-Void-Routing: c.rewrite
|
|
335
|
+
X-Void-Routing: redirect[/old] -> /new 301 (_redirects:12)
|
|
336
|
+
X-Void-Routing: rewrite[/api/*] -> /backend/:splat (void.json#routing.rewrites)
|
|
337
|
+
X-Void-Routing: fallback[/docs/*] -> /docs.html (void.json#routing.fallbacks)
|
|
338
|
+
X-Void-Routing: c.rewrite -> /new-path (middleware)
|
|
339
339
|
X-Void-Routing: pass-through
|
|
340
340
|
```
|
|
341
341
|
|
|
342
|
-
Phases are separated by
|
|
342
|
+
Phases are separated by `->` so the diagnostic value stays valid as an HTTP header. The parenthesised source hint points at the exact declaration — a line number for `_redirects`, a config path for `void.json`, or `spa-default` for the synthetic SPA catch-all. The header is **only emitted in dev** — production builds strip both the trace code and the per-rule `origin` metadata from the bundle and manifest.
|
|
343
343
|
|
|
344
344
|
::: info What fires in `vite dev`
|
|
345
345
|
`vite dev` applies the full static routing pipeline on every target — `node`, `bun`, `deno`, and the default target alike. `void.json` rules (`routing.redirects` / `routing.rewrites` / `routing.fallbacks` / `routing.headers`) and file-based rules (`public/_redirects`, `public/_headers`) are merged at plugin load and compiled into the Hono middleware your worker runs behind. Editing `_redirects` or `_headers` during a dev session re-runs the merge and reloads the page — no restart needed. `c.rewrite()` calls in middleware work everywhere because they live inside the worker itself, and the `X-Void-Routing` dev header reports every decision on every target.
|
|
@@ -86,7 +86,7 @@ After that, the full interactive flow walks through:
|
|
|
86
86
|
4. **Skills:** links Void skills using the same detected or selected agent context.
|
|
87
87
|
5. **MCP config:** writes MCP server config using that same agent context.
|
|
88
88
|
6. **Demo code:** for existing non-Pages projects, optionally scaffolds a `db/migrations/` directory plus an API route and typed fetch example.
|
|
89
|
-
7. **GitHub Actions:** optionally creates `.github/workflows/deploy.yml` with the right package manager
|
|
89
|
+
7. **GitHub Actions:** optionally creates `.github/workflows/void-deploy.yml`. The workflow deploys on pushes to `main` and authenticates via [GitHub OIDC](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect) — no long-lived `VOID_TOKEN` secret is stored in the repo. The job requests an OIDC token (audience `void`), exchanges it at `POST $VOID_API_URL/auth/github-oidc` for a short-lived project-scoped deploy token, then runs `void deploy --project <slug>` with the right package manager. The project slug is baked in from your linked project (`.void/project.json`) when known; otherwise the workflow reads a `VOID_PROJECT` repository variable.
|
|
90
90
|
8. **`env.ts` scaffold:** if the project has no `env.ts` but has `.env` / `.env.example` / `.env.local` / `.env.development*` files on disk, generates an `env.ts` pre-populated with their keys. Values get conservative type inference (`boolean`/`url`/`number`/`string`) — the file carries a banner nudging you to tighten anything the heuristic got wrong.
|
|
91
91
|
9. **Project setup:** optionally logs you in, lets you select or create a project, and writes `.void/project.json` so your first deploy can just be `void deploy`.
|
|
92
92
|
|
|
@@ -98,10 +98,12 @@ Use flags to run individual steps without prompts:
|
|
|
98
98
|
| ------------ | ------------------------------------------------- |
|
|
99
99
|
| `--tsconfig` | Only update `tsconfig.json` |
|
|
100
100
|
| `--agents` | Set up agent instructions, skills, and MCP config |
|
|
101
|
-
| `--github` | Only create GitHub Actions workflow
|
|
101
|
+
| `--github` | Only create the GitHub Actions deploy workflow |
|
|
102
102
|
|
|
103
103
|
Flags can be combined. When any flag is provided, only the specified steps run and interactive prompts are skipped.
|
|
104
104
|
|
|
105
|
+
The `--github` workflow uses GitHub OIDC: you connect the repository to your Void project once with `void github connect <project> --repo <owner/repo> --executor github_actions` (see the GitHub section below), and pushes to `main` deploy automatically. There is no `VOID_TOKEN` secret to create or rotate. To target staging, set a `VOID_API_URL` repository variable to `https://api.staging.void.cloud`.
|
|
106
|
+
|
|
105
107
|
For projects that already have `"extends"`, `void init --tsconfig` preserves the existing config and adds `./.void/tsconfig.json`. If the existing config defines `files` or `compilerOptions.paths`, Void also merges its generated declaration files and aliases into the root config because TypeScript replaces those fields across `extends` instead of deeply merging them.
|
|
106
108
|
|
|
107
109
|
### `void prepare`
|
|
@@ -564,6 +566,67 @@ PORT=3000
|
|
|
564
566
|
|
|
565
567
|
See [Environment Variables](../guide/env-vars.md) for the full guide.
|
|
566
568
|
|
|
569
|
+
## GitHub
|
|
570
|
+
|
|
571
|
+
Deploy-on-GitHub works from **any** Void login — Google, GitHub, or other SSO. The first time you connect GitHub, Void links your GitHub identity to your current account (a one-time step, independent of how you logged in); it never creates a second account.
|
|
572
|
+
|
|
573
|
+
### `void github link`
|
|
574
|
+
|
|
575
|
+
```
|
|
576
|
+
void github link
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
Link your current Void account to a GitHub identity. Opens your browser to authorize Void on GitHub (a localhost + PKCE handshake, the same mechanics as `void auth login`), then binds that GitHub identity to the logged-in account. Requires an authenticated CLI (`void auth login` first).
|
|
580
|
+
|
|
581
|
+
You normally don't need to run this directly — `void github install` runs the link automatically when your account has no GitHub identity yet. Run it on its own to link ahead of time, or to link a GitHub identity without installing the App. If that GitHub account is already linked to a different Void account, the command fails and asks you to use a different GitHub account.
|
|
582
|
+
|
|
583
|
+
### `void github install`
|
|
584
|
+
|
|
585
|
+
```
|
|
586
|
+
void github install
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
Open the GitHub App install page in your browser. If your account has no linked GitHub identity yet, `void github install` first runs the GitHub link automatically (browser authorize), then continues. After installing, run `void github connect` to link a repository to your project.
|
|
590
|
+
|
|
591
|
+
### `void github installations`
|
|
592
|
+
|
|
593
|
+
```
|
|
594
|
+
void github installations
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
List all GitHub App installations linked to your account. Each entry includes the `[id: <installation_id>]` needed for `--installation` in non-interactive use.
|
|
598
|
+
|
|
599
|
+
### `void github connect`
|
|
600
|
+
|
|
601
|
+
```
|
|
602
|
+
void github connect [project] [options]
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
Connect a GitHub repository to a Void project for automatic deploys. On every push to the configured branch, Void builds and deploys your project automatically.
|
|
606
|
+
|
|
607
|
+
**Options**
|
|
608
|
+
|
|
609
|
+
| Flag | Description |
|
|
610
|
+
| --------------------- | ------------------------------------------------------------------------------- |
|
|
611
|
+
| `--project <name>` | Project name (alias for the positional argument) |
|
|
612
|
+
| `--installation <id>` | GitHub App installation ID (required when you have multiple installations) |
|
|
613
|
+
| `--repo <owner/repo>` | Repository full name — required unless the installation grants exactly one repo |
|
|
614
|
+
| `--branch <name>` | Branch to deploy from — **required in non-interactive mode** |
|
|
615
|
+
| `--executor <type>` | Build executor: `container` (default) or `github_actions` |
|
|
616
|
+
|
|
617
|
+
**Non-interactive use (CI)**
|
|
618
|
+
|
|
619
|
+
When stdin is not a TTY, `void github connect` never prompts — it fails closed and names any flag it needs. `--branch` is always required. `--project` must be resolvable (positional / `--project` / `VOID_PROJECT` / linked `.void/project.json`). `--installation` is required only when your account has more than one installation; otherwise the sole installation is used. `--repo` is required when the installation grants access to all repos or to more than one selected repo; when it grants exactly one repo that repo is used automatically. Use `void github installations` to discover the `installation_id`.
|
|
620
|
+
|
|
621
|
+
```
|
|
622
|
+
void github connect my-app \
|
|
623
|
+
--installation 42 \
|
|
624
|
+
--repo owner/my-app \
|
|
625
|
+
--branch main
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
**Project resolution** follows the same order as deploy: positional / `--project`, `VOID_PROJECT`, linked project (`.void/project.json`).
|
|
629
|
+
|
|
567
630
|
## Custom Domains
|
|
568
631
|
|
|
569
632
|
### `void domain add`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|