Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"devDependencies": {
"@iconify/vue": "5.0.0",
"@voidzero-dev/vitepress-theme": "^4.8.2",
"oxc-minify": "^0.114.0",
"reka-ui": "2.8.2",
"@voidzero-dev/vitepress-theme": "^4.8.4",
"oxc-minify": "^0.121.0",
"reka-ui": "2.9.2",
"vitepress": "2.0.0-alpha.16",
"vitepress-plugin-group-icons": "^1.7.1",
"void": "workspace:*"
Expand Down
21 changes: 5 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,15 @@
"devDependencies": {
"@typescript/native-preview": "catalog:",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"oxfmt": "^0.32.0",
"oxlint": "^1.47.0",
"lint-staged": "^16.4.0",
"oxfmt": "^0.42.0",
"oxlint": "^1.57.0",
"playwright": "^1.58.2",
"vitest": "^4.0.18"
"vitest": "^4.1.1"
},
"lint-staged": {
"*": "oxfmt --no-error-on-unmatched-pattern",
"*.{js,jsx,ts,tsx,mjs,cjs}": "oxlint"
},
"packageManager": "pnpm@10.29.3",
"pnpm": {
"onlyBuiltDependencies": [
"better-sqlite3",
"esbuild",
"workerd"
],
"overrides": {
"vite": "catalog:",
"esbuild": "^0.27.3"
}
}
"packageManager": "pnpm@10.29.3"
}
10 changes: 5 additions & 5 deletions packages/md/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@shikijs/engine-javascript": "^3.23.0",
"@shikijs/transformers": "^3.23.0",
"@shikijs/engine-javascript": "^4.0.2",
"@shikijs/transformers": "^4.0.2",
"gray-matter": "^4.0.3",
"markdown-exit": "^1.0.0-beta.8",
"markdown-exit": "1.0.0-beta.9",
"markdown-it-anchor": "^9.2.0",
"markdown-it-attrs": "^4.3.1",
"markdown-it-container": "^4.0.0",
"markdown-it-emoji": "^3.0.0",
"shiki": "^3.23.0",
"shiki": "^4.0.2",
"tinyglobby": "^0.2.15"
},
"devDependencies": {
"@types/node": "catalog:",
"tsdown": "catalog:",
"vite": "catalog:",
"void": "workspace:*",
"vue": "^3.5.0"
"vue": "^3.5.31"
},
"peerDependencies": {
"vite": "catalog:",
Expand Down
10 changes: 5 additions & 5 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@vitejs/plugin-react": "^6.0.0"
"@vitejs/plugin-react": "^6.0.1"
},
"devDependencies": {
"@types/node": "catalog:",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"tsdown": "catalog:",
"vite": "catalog:",
"void": "workspace:*"
Expand Down
4 changes: 2 additions & 2 deletions packages/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"vite-plugin-solid": "^2.11.10"
"vite-plugin-solid": "^2.11.11"
},
"devDependencies": {
"@types/node": "catalog:",
"solid-js": "^1.9.11",
"solid-js": "^1.9.12",
"tsdown": "catalog:",
"vite": "catalog:",
"void": "workspace:*"
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@sveltejs/vite-plugin-svelte": "^6.2.4"
"@sveltejs/vite-plugin-svelte": "^7.0.0"
},
"devDependencies": {
"@types/node": "catalog:",
"svelte": "^5.53.2",
"svelte": "^5.55.0",
"tsdown": "catalog:",
"vite": "catalog:",
"void": "workspace:*"
Expand Down
20 changes: 10 additions & 10 deletions packages/void/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,37 +168,37 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@cloudflare/vite-plugin": "^1.25.6",
"@cloudflare/vite-plugin": "^1.30.1",
"@cloudflare/workers-types": "catalog:",
"@hono/oauth-providers": "^0.8.5",
"@napi-rs/keyring": "1.2.0",
"better-auth": "^1.5.4",
"better-sqlite3": "^12.6.2",
"better-auth": "^1.5.6",
"better-sqlite3": "^12.8.0",
"drizzle-arktype": "^0.1.3",
"drizzle-kit": "^0.31.9",
"drizzle-kit": "^0.31.10",
"drizzle-orm": "^0.45.1",
"drizzle-valibot": "^0.4.2",
"drizzle-zod": "^0.8.3",
"hono": "^4.12.7",
"hono": "^4.12.9",
"pg": "^8.20.0",
"wrangler": "catalog:"
},
"devDependencies": {
"@clack/prompts": "catalog:",
"@electric-sql/pglite": "0.3.15",
"@electric-sql/pglite": "0.4.2",
"@types/better-sqlite3": "^7.6.13",
"@types/node": "catalog:",
"@types/pg": "^8.18.0",
"@types/pg": "^8.20.0",
"@typescript/native-preview": "catalog:",
"arktype": "^2.1.29",
"arktype": "^2.2.0",
"es-module-lexer": "^2.0.0",
"estree-walker": "^3.0.3",
"ofetch": "^2.0.0-alpha.3",
"ofetch": "2.0.0-alpha.3",
"pglite-server": "0.1.5",
"picocolors": "^1.1.1",
"tinyglobby": "^0.2.15",
"tsdown": "catalog:",
"valibot": "^1.2.0",
"valibot": "^1.3.1",
"vite": "catalog:",
"zod": "^4.3.6"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/void/src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { SubcommandDef, SubcommandResult } from "./subcommand-prompt";
import { secretSubcommands, parseSecretArgs } from "./secret-args";
import { dbSubcommands, parseDbArgs } from "./db-args";
import { genSubcommands, parseGenArgs } from "./gen-args";
import { domainSubcommands, parseDomainArgs } from "./domain";
import { domainSubcommands, parseDomainArgs } from "./domain-args";
import { categoryTitle, helpLine, pc, sectionTitle } from "./output";
import { getPackageDir } from "./agents";
import { asciiArts } from "./ascii";
Expand Down
39 changes: 39 additions & 0 deletions packages/void/src/cli/domain-args.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { SubcommandDef } from "./subcommand-prompt";

export const domainSubcommands: SubcommandDef[] = [
{ name: "add", arg: "<hostname>", description: "Add a custom domain" },
{ name: "delete", arg: "<hostname>", description: "Remove a custom domain" },
{ name: "list", description: "List custom domains + status" },
{ name: "status", arg: "<hostname>", description: "Check domain verification status" },
];

export interface DomainArgs {
subcommand: "add" | "delete" | "list" | "status";
hostname?: string;
projectSlug?: string;
}

export function parseDomainArgs(args: string[]): DomainArgs {
const subcommand = args[0] as DomainArgs["subcommand"];
if (!subcommand || !["add", "delete", "list", "status"].includes(subcommand)) {
throw new Error("Usage: void domain <add|delete|list|status> [hostname] [--project <name>]");
}

let hostname: string | undefined;
let projectSlug: string | undefined;

const rest = args.slice(1);
for (let i = 0; i < rest.length; i++) {
if (rest[i] === "--project" && rest[i + 1]) {
projectSlug = rest[++i];
} else if (!hostname) {
hostname = rest[i];
}
}

if ((subcommand === "add" || subcommand === "delete" || subcommand === "status") && !hostname) {
throw new Error(`Usage: void domain ${subcommand} <hostname> [--project <name>]`);
}

return { subcommand, hostname, projectSlug };
}
40 changes: 1 addition & 39 deletions packages/void/src/cli/domain.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,10 @@
import { log, note } from "@clack/prompts";
import type { SubcommandDef } from "./subcommand-prompt";
import { getToken } from "./auth";
import { PlatformClient } from "./client";
import type { DomainArgs } from "./domain-args";
import { readProjectConfig } from "./project";
import { pc } from "./output";

export const domainSubcommands: SubcommandDef[] = [
{ name: "add", arg: "<hostname>", description: "Add a custom domain" },
{ name: "delete", arg: "<hostname>", description: "Remove a custom domain" },
{ name: "list", description: "List custom domains + status" },
{ name: "status", arg: "<hostname>", description: "Check domain verification status" },
];

export interface DomainArgs {
subcommand: "add" | "delete" | "list" | "status";
hostname?: string;
projectSlug?: string;
}

export function parseDomainArgs(args: string[]): DomainArgs {
const subcommand = args[0] as DomainArgs["subcommand"];
if (!subcommand || !["add", "delete", "list", "status"].includes(subcommand)) {
throw new Error("Usage: void domain <add|delete|list|status> [hostname] [--project <name>]");
}

let hostname: string | undefined;
let projectSlug: string | undefined;

const rest = args.slice(1);
for (let i = 0; i < rest.length; i++) {
if (rest[i] === "--project" && rest[i + 1]) {
projectSlug = rest[++i];
} else if (!hostname) {
hostname = rest[i];
}
}

if ((subcommand === "add" || subcommand === "delete" || subcommand === "status") && !hostname) {
throw new Error(`Usage: void domain ${subcommand} <hostname> [--project <name>]`);
}

return { subcommand, hostname, projectSlug };
}

export async function runDomainCommand(root: string, args: DomainArgs): Promise<void> {
const token = getToken();
if (!token) {
Expand Down
23 changes: 23 additions & 0 deletions packages/void/src/runtime/fetch-error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { FetchError as OFetchError } from "ofetch";

export interface FetchResponse<T = unknown> extends Response {
_data?: T;
}

export interface FetchError<T = unknown> extends Error {
request?: RequestInfo;
options?: RequestInit & Record<string, unknown>;
response?: FetchResponse<T>;
data?: T;
status?: number;
statusText?: string;
statusCode?: number;
statusMessage?: string;
}

type FetchErrorConstructor = new <T = unknown>(
message: string,
opts?: { cause: unknown },
) => FetchError<T>;

export const FetchError = OFetchError as unknown as FetchErrorConstructor;
6 changes: 3 additions & 3 deletions packages/void/src/runtime/fetch-stream.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ofetch, FetchError } from "ofetch";
import type { RouteMap } from "void/routes";

import { ofetch } from "ofetch";
import { FetchError } from "./fetch-error";
export { FetchError as StreamError };

import type { RouteMap } from "void/routes";
type MethodsOf<P extends keyof RouteMap> = keyof RouteMap[P] & string;
type InputOf<P extends keyof RouteMap, M extends MethodsOf<P>> = RouteMap[P][M] extends {
input: infer I;
Expand Down
6 changes: 3 additions & 3 deletions packages/void/src/runtime/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ofetch, FetchError } from "ofetch";
import type { RouteMap } from "void/routes";

import { ofetch } from "ofetch";
import { FetchError } from "./fetch-error";
export { FetchError };

import type { RouteMap } from "void/routes";
type MethodsOf<P extends keyof RouteMap> = keyof RouteMap[P] & string;
type DefaultMethod<P extends keyof RouteMap> = "GET" extends MethodsOf<P> ? "GET" : never;

Expand Down
2 changes: 2 additions & 0 deletions packages/void/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ export default defineConfig({
clean: true,
plugins: [stripUseAsmPlugin(), injectWorkersTypesReferencePlugin()],
external: [
// This module is augmented by users, keep it as external so tsdown does not rewrite it.
"void/routes",
Comment on lines +99 to +100

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix for dts generation. Without it, tsdown rewrites void/routes to the internal stub.

"vite",
"@cloudflare/vite-plugin",
"better-sqlite3",
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@vitejs/plugin-vue": "^5.0.0"
"@vitejs/plugin-vue": "^6.0.5"
},
"devDependencies": {
"@types/node": "catalog:",
"tsdown": "catalog:",
"vite": "catalog:",
"void": "workspace:*",
"vue": "^3.5.0"
"vue": "^3.5.31"
},
"peerDependencies": {
"vite": "catalog:",
Expand Down
4 changes: 2 additions & 2 deletions playground/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"build": "astro build"
},
"dependencies": {
"@astrojs/cloudflare": "^13.0.0",
"astro": "^6.0.0"
"@astrojs/cloudflare": "^13.1.3",
"astro": "^6.0.8"
},
"devDependencies": {
"@typescript/native-preview": "catalog:",
Expand Down
10 changes: 5 additions & 5 deletions playground/kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"hono": "^4.11.9",
"valibot": "^1.2.0",
"vue": "^3.5.0"
"hono": "^4.12.9",
"valibot": "^1.3.1",
"vue": "^3.5.31"
},
"devDependencies": {
"@void/vue": "workspace:*",
"typescript": "~5.8.3",
"typescript": "~6.0.2",
"vite": "catalog:",
"void": "workspace:*",
"vue-tsc": "^3.2.4"
"vue-tsc": "^3.2.6"
}
}
6 changes: 3 additions & 3 deletions playground/markdown-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"vue": "^3.5.0"
"vue": "^3.5.31"
},
"devDependencies": {
"@void/md": "workspace:*",
"@void/vue": "workspace:*",
"typescript": "~5.8.3",
"typescript": "~6.0.2",
"vite": "catalog:",
"void": "workspace:*",
"vue-tsc": "^3.2.4"
"vue-tsc": "^3.2.6"
}
}
Loading
Loading