void 0.7.10 → 0.7.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.
Files changed (60) hide show
  1. package/dist/{auth-cmd-wVm1oBDB.mjs → auth-cmd-bS88H4Lb.mjs} +3 -3
  2. package/dist/{better-auth-shared-CjnJZFC0.mjs → better-auth-shared-D2JaoCs4.mjs} +1 -1
  3. package/dist/{cache-DQ0nyYqX.mjs → cache-DUDCNty6.mjs} +4 -4
  4. package/dist/{cancel-deploy-Ues45U-R.mjs → cancel-deploy-DOuSbPwX.mjs} +4 -4
  5. package/dist/cli/cli.mjs +26 -26
  6. package/dist/{client-BollDL7Y.mjs → client-C_DYiXeu.mjs} +80 -76
  7. package/dist/{config-DqkeX_Fa.mjs → config-CeRQg3Lz.mjs} +1 -1
  8. package/dist/{config-BzM9Dy7T.mjs → config-DyUSwbeX.mjs} +1 -1
  9. package/dist/{create-project-C6c0tsda.mjs → create-project-hvFe6rbI.mjs} +4 -4
  10. package/dist/{db-DotnZ8gC.mjs → db-YEYSTfGw.mjs} +27 -27
  11. package/dist/{delete-DGBvVhNi.mjs → delete-XyM_VD9o.mjs} +4 -4
  12. package/dist/{deploy-BoivjIGQ.mjs → deploy-CPAEgVQm.mjs} +23 -23
  13. package/dist/{domain-BvO6J5pb.mjs → domain-Dvj7u8tr.mjs} +4 -4
  14. package/dist/{drizzle-C-NRqGhx.mjs → drizzle-Cx7cVwrE.mjs} +1 -1
  15. package/dist/{env-D5rCrXsJ.mjs → env-Bjl0rzuf.mjs} +6 -6
  16. package/dist/{env-types-DknSA4SO.mjs → env-types-BSQghXbx.mjs} +1 -1
  17. package/dist/{env-validation-Bc_aiBUm.mjs → env-validation-Buy5pe3u.mjs} +3 -3
  18. package/dist/{gen-CpeKIqlM.mjs → gen-DU8NIdrH.mjs} +7 -7
  19. package/dist/{headers-C7Yf6_CN.mjs → headers-CuVHn6Kl.mjs} +2 -2
  20. package/dist/index.mjs +79 -41
  21. package/dist/{init-XYRQUhxJ.mjs → init-iIiQWzyB.mjs} +15 -15
  22. package/dist/{link-CTw4KItw.mjs → link-DdXqlUiJ.mjs} +5 -5
  23. package/dist/{list-DEUWWBKk.mjs → list-9Bxa5Odn.mjs} +4 -4
  24. package/dist/{login-wdS4k9e-.mjs → login-C_MfDjhu.mjs} +3 -3
  25. package/dist/{logs-BoZ4ZWnl.mjs → logs-DjqCpEER.mjs} +4 -4
  26. package/dist/{mcp-CVKEl-Sc.mjs → mcp-vA0880_K.mjs} +2 -2
  27. package/dist/{node-DHVCtkgt.mjs → node-gxRQXIRT.mjs} +3 -3
  28. package/dist/{output-BwlcIYSR.mjs → output-D3g5otMC.mjs} +1 -1
  29. package/dist/pages/index.mjs +3 -3
  30. package/dist/pages/islands-plugin.mjs +1 -1
  31. package/dist/{plugin-inference-CXUuq0aC.mjs → plugin-inference-BexV6LL3.mjs} +1 -1
  32. package/dist/{prepare-CKzO06-Z.mjs → prepare-BEkH89oX.mjs} +10 -10
  33. package/dist/{preset-BhnZpb7t.mjs → preset-CYQh93UF.mjs} +1 -1
  34. package/dist/{project-cmd-i9Kvz4KZ.mjs → project-cmd-CeXO06hG.mjs} +10 -10
  35. package/dist/{rollback-CGsGd4ti.mjs → rollback-C8OSMxmq.mjs} +4 -4
  36. package/dist/{runner-BUPRnMFN.mjs → runner-C0d3lJo1.mjs} +42 -2
  37. package/dist/{runner-pg-BI6f6Ncm.mjs → runner-pg-Bd_172vF.mjs} +1 -1
  38. package/dist/runtime/ai.mjs +1 -1
  39. package/dist/runtime/better-auth-pg.mjs +1 -1
  40. package/dist/runtime/better-auth.mjs +1 -1
  41. package/dist/runtime/remote/index.mjs +1 -1
  42. package/dist/{scan-CWfLxtOe.mjs → scan-CKpylFj9.mjs} +1 -1
  43. package/dist/{scan-B8iEm8xn.mjs → scan-CkK1Hzpa.mjs} +3 -3
  44. package/dist/{secret-BeBmBxwf.mjs → secret-NDvlqAN2.mjs} +4 -4
  45. package/dist/{skills-CbuYOthf.mjs → skills-SAG0WyVn.mjs} +1 -1
  46. package/dist/{subcommand-prompt-BMS1TNG5.mjs → subcommand-prompt-q9T06dpg.mjs} +2 -2
  47. package/dist/{validate-CaMavMxu.mjs → validate-DW3ViKTA.mjs} +1 -1
  48. package/package.json +2 -2
  49. /package/dist/{cf-access-Dee5cXxL.mjs → cf-access-BW8K93Fm.mjs} +0 -0
  50. /package/dist/{collect-CjeZgz5D.mjs → collect-HqAuilH6.mjs} +0 -0
  51. /package/dist/{discover-B7FkXBLB.mjs → discover-CKGQpis8.mjs} +0 -0
  52. /package/dist/{dist-Dayj3gCK.mjs → dist-D2L3_KTK.mjs} +0 -0
  53. /package/dist/{dist-DUyXJLkq.mjs → dist-q8b2Mjgb.mjs} +0 -0
  54. /package/dist/{dotenv-zdFCCgFU.mjs → dotenv-HQNhRalS.mjs} +0 -0
  55. /package/dist/{log-DXdqnmhF.mjs → log-7ChR5Fbc.mjs} +0 -0
  56. /package/dist/{magic-string.es-D6g9UnIy.mjs → magic-string.es-DS_lmuBe.mjs} +0 -0
  57. /package/dist/{project-TqORyHn8.mjs → project-DhB4A8_g.mjs} +0 -0
  58. /package/dist/{project-tsconfig-DfkESbDL.mjs → project-tsconfig-Bfy55qvs.mjs} +0 -0
  59. /package/dist/{providers-B3aMxWzP.mjs → providers-BlFNPYen.mjs} +0 -0
  60. /package/dist/{route-types-Cnqj_8a7.mjs → route-types-qVL-v-CB.mjs} +0 -0
@@ -1,6 +1,6 @@
1
- import { i as dim, l as tablePrefix, n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
- import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
- import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-BollDL7Y.mjs";
1
+ import { i as dim, l as tablePrefix, n as cliTitle, s as import_picocolors } from "./output-D3g5otMC.mjs";
2
+ import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-C_DYiXeu.mjs";
3
+ import { c as R, g as ge, y as ye } from "./dist-D2L3_KTK.mjs";
4
4
  //#region src/cli/projects.ts
5
5
  async function runProjectsCommand(root) {
6
6
  console.log();
@@ -34,32 +34,32 @@ async function runProjectsCommand(root) {
34
34
  //#region src/cli/project-cmd.ts
35
35
  async function runProjectCommand(root, args) {
36
36
  if (args.subcommand === "status") {
37
- const { runListCommand } = await import("./list-DEUWWBKk.mjs");
37
+ const { runListCommand } = await import("./list-9Bxa5Odn.mjs");
38
38
  return runListCommand(root, args.name || void 0);
39
39
  }
40
40
  if (args.subcommand === "link") {
41
- const { runLink } = await import("./link-CTw4KItw.mjs");
41
+ const { runLink } = await import("./link-DdXqlUiJ.mjs");
42
42
  return runLink(root, args.name || void 0);
43
43
  }
44
44
  if (args.subcommand === "list") return runProjectsCommand(root);
45
45
  if (args.subcommand === "logs") {
46
- const { runLogsCommand } = await import("./logs-BoZ4ZWnl.mjs");
46
+ const { runLogsCommand } = await import("./logs-DjqCpEER.mjs");
47
47
  return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
48
48
  }
49
49
  if (args.subcommand === "rollback") {
50
- const { runRollbackCommand } = await import("./rollback-CGsGd4ti.mjs");
50
+ const { runRollbackCommand } = await import("./rollback-C8OSMxmq.mjs");
51
51
  return runRollbackCommand(root, args.deployId || void 0);
52
52
  }
53
53
  if (args.subcommand === "cancel") {
54
- const { runCancelDeployCommand } = await import("./cancel-deploy-Ues45U-R.mjs");
54
+ const { runCancelDeployCommand } = await import("./cancel-deploy-DOuSbPwX.mjs");
55
55
  return runCancelDeployCommand(root, args.deployId || void 0);
56
56
  }
57
57
  if (args.subcommand === "delete") {
58
- const { runDeleteCommand } = await import("./delete-DGBvVhNi.mjs");
58
+ const { runDeleteCommand } = await import("./delete-XyM_VD9o.mjs");
59
59
  return runDeleteCommand(root, args.name || void 0, { force: args.force });
60
60
  }
61
61
  if (args.subcommand === "purge-cache") {
62
- const { runPurgeCacheCommand } = await import("./cache-DQ0nyYqX.mjs");
62
+ const { runPurgeCacheCommand } = await import("./cache-DUDCNty6.mjs");
63
63
  return runPurgeCacheCommand(root, args.projectSlug || void 0);
64
64
  }
65
65
  }
@@ -1,7 +1,7 @@
1
- import { a as ensureUtc, i as dim, n as cliTitle, r as createSpinner, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
- import { _ as me, c as R, g as ge, i as Ee, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
3
- import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
1
+ import { a as ensureUtc, i as dim, n as cliTitle, r as createSpinner, s as import_picocolors } from "./output-D3g5otMC.mjs";
2
+ import { c as getToken, n as PlatformClient } from "./client-C_DYiXeu.mjs";
3
+ import { _ as me, c as R, g as ge, i as Ee, v as ue, x as q, y as ye } from "./dist-D2L3_KTK.mjs";
4
+ import { r as readProjectConfig } from "./project-DhB4A8_g.mjs";
5
5
  //#region src/cli/rollback.ts
6
6
  async function runRollbackCommand(root, deployId) {
7
7
  console.log();
@@ -1,8 +1,14 @@
1
1
  import { a as join, n as dirname } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { t as collectMigrations } from "./collect-CjeZgz5D.mjs";
2
+ import { t as collectMigrations } from "./collect-HqAuilH6.mjs";
3
3
  import { existsSync, mkdirSync } from "node:fs";
4
4
  import { createHash, createHmac } from "node:crypto";
5
5
  //#region src/migrations/runner.ts
6
+ const SQLITE_INTERNAL_TABLES = new Set([
7
+ "_cf_METADATA",
8
+ "_migrations",
9
+ "_void_migrations",
10
+ "__drizzle_migrations"
11
+ ]);
6
12
  function toBetterSqlite3Error(error) {
7
13
  const message = error instanceof Error ? error.message : String(error);
8
14
  if (!message.includes("Could not locate the bindings file")) return error instanceof Error ? error : new Error(message);
@@ -70,6 +76,39 @@ function upgradeTrackingTable(db) {
70
76
  db.exec(`DROP TABLE IF EXISTS _migrations`);
71
77
  }).immediate();
72
78
  }
79
+ function getApplicationTableNames(db) {
80
+ return db.prepare("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name").all().map((row) => row.name).filter((name) => !name.startsWith("sqlite_") && !SQLITE_INTERNAL_TABLES.has(name));
81
+ }
82
+ async function getApplicationTables(dbPath) {
83
+ if (!existsSync(dbPath)) return [];
84
+ const db = await openSqliteDatabase(dbPath, { readonly: true });
85
+ try {
86
+ return getApplicationTableNames(db);
87
+ } finally {
88
+ db.close();
89
+ }
90
+ }
91
+ function assertLocalMigrationState(migrations, appliedNames, applicationTables) {
92
+ const migrationNames = new Set(migrations.map((migration) => migration.name));
93
+ const missingFiles = [...appliedNames].filter((name) => !migrationNames.has(name)).sort();
94
+ if (missingFiles.length > 0) throw new Error([
95
+ "Local database migration history does not match db/migrations/.",
96
+ "",
97
+ "These migrations are recorded as applied locally but no longer exist on disk:",
98
+ ...missingFiles.map((name) => ` - ${name}`),
99
+ "",
100
+ "If the migration files were renamed, run `void db rename-migrations`.",
101
+ "If the migration history was intentionally rewritten, run `void db reset` to recreate the local database from the current files."
102
+ ].join("\n"));
103
+ if (appliedNames.size === 0 && migrations.length > 0 && applicationTables.length > 0) throw new Error([
104
+ "Local database already has application tables but no Void migration history.",
105
+ "",
106
+ `Existing tables: ${applicationTables.join(", ")}`,
107
+ "",
108
+ "This usually means the schema was applied with `void db push` or the local database was created before migration tracking existed.",
109
+ "Run `void db reset` to recreate the local database from db/migrations/, or delete the local D1 state if you do not need its data."
110
+ ].join("\n"));
111
+ }
73
112
  /**
74
113
  * Apply unapplied SQL migrations from the migrations directory.
75
114
  * Tracks applied migrations in the `_void_migrations` table.
@@ -103,6 +142,7 @@ async function runMigrations(migrationsDir, dbPath) {
103
142
  )
104
143
  `);
105
144
  const appliedSet = new Set(db.prepare("SELECT name FROM _void_migrations").all().map((r) => r.name));
145
+ assertLocalMigrationState(allMigrations, appliedSet, getApplicationTableNames(db));
106
146
  const pending = allMigrations.filter((m) => !appliedSet.has(m.name));
107
147
  if (pending.length === 0) return [];
108
148
  const insertStmt = db.prepare("INSERT INTO _void_migrations (name) VALUES (?)");
@@ -120,4 +160,4 @@ async function runMigrations(migrationsDir, dbPath) {
120
160
  }
121
161
  }
122
162
  //#endregion
123
- export { getAppliedMigrations, getMiniflareDatabasePath, openSqliteDatabase, runMigrations };
163
+ export { getApplicationTables, getAppliedMigrations, getMiniflareDatabasePath, openSqliteDatabase, runMigrations };
@@ -1,4 +1,4 @@
1
- import { t as collectMigrations } from "./collect-CjeZgz5D.mjs";
1
+ import { t as collectMigrations } from "./collect-HqAuilH6.mjs";
2
2
  //#region src/migrations/runner-pg.ts
3
3
  /**
4
4
  * Apply unapplied SQL migrations via a connected PostgreSQL client.
@@ -1,4 +1,4 @@
1
- import { t as cfAccessHeaders } from "../cf-access-Dee5cXxL.mjs";
1
+ import { t as cfAccessHeaders } from "../cf-access-BW8K93Fm.mjs";
2
2
  import { i as getRawRuntimeEnv } from "../env-raw-DtfQ9E31.mjs";
3
3
  //#region src/runtime/ai-types.ts
4
4
  /** Maps provider prefix to expected env var name for the API key */
@@ -1,5 +1,5 @@
1
1
  import { t as applyPgAuthMigrations } from "../auth-migrations-BwLPwRgH.mjs";
2
- import { t as createVoidAuthRuntime } from "../better-auth-shared-CjnJZFC0.mjs";
2
+ import { t as createVoidAuthRuntime } from "../better-auth-shared-D2JaoCs4.mjs";
3
3
  //#region src/runtime/better-auth-pg.ts
4
4
  function resolveConnectionString(env) {
5
5
  const connectionString = typeof env.DATABASE_URL === "string" && env.DATABASE_URL.length > 0 ? env.DATABASE_URL : typeof env.HYPERDRIVE?.connectionString === "string" && env.HYPERDRIVE.connectionString.length > 0 ? env.HYPERDRIVE.connectionString : void 0;
@@ -1,5 +1,5 @@
1
1
  import { n as applySqliteAuthMigrations } from "../auth-migrations-BwLPwRgH.mjs";
2
- import { t as createVoidAuthRuntime } from "../better-auth-shared-CjnJZFC0.mjs";
2
+ import { t as createVoidAuthRuntime } from "../better-auth-shared-D2JaoCs4.mjs";
3
3
  //#region src/runtime/better-auth.ts
4
4
  async function resolveDatabase(env) {
5
5
  if (!env.DB) throw new Error("auth: Better Auth requires the \"DB\" D1 binding for sqlite apps.");
@@ -1,4 +1,4 @@
1
- import { t as cfAccessHeaders } from "../../cf-access-Dee5cXxL.mjs";
1
+ import { t as cfAccessHeaders } from "../../cf-access-BW8K93Fm.mjs";
2
2
  //#region src/runtime/remote/client.ts
3
3
  /**
4
4
  * HTTP client for the remote bindings proxy (proxy.void.cloud).
@@ -1,5 +1,5 @@
1
1
  import { a as join, n as dirname, r as extname, t as basename } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { t as glob } from "./dist-DUyXJLkq.mjs";
2
+ import { t as glob } from "./dist-q8b2Mjgb.mjs";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  //#region src/router/parse-filename.ts
5
5
  const EXTENSIONS = [
@@ -1,7 +1,7 @@
1
1
  import { a as join, t as basename } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { n as globSync, t as glob } from "./dist-DUyXJLkq.mjs";
3
- import { d as isCallExpression, f as isIdentifier, h as isObjectExpression, p as isLiteral } from "./plugin-inference-CXUuq0aC.mjs";
4
- import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-CWfLxtOe.mjs";
2
+ import { n as globSync, t as glob } from "./dist-q8b2Mjgb.mjs";
3
+ import { d as isCallExpression, f as isIdentifier, h as isObjectExpression, p as isLiteral } from "./plugin-inference-BexV6LL3.mjs";
4
+ import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-CKpylFj9.mjs";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { parseSync } from "vite";
7
7
  //#region src/crons/scan.ts
@@ -1,7 +1,7 @@
1
- import { n as cliTitle } from "./output-BwlcIYSR.mjs";
2
- 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-Dayj3gCK.mjs";
3
- import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
1
+ import { n as cliTitle } from "./output-D3g5otMC.mjs";
2
+ import { c as getToken, n as PlatformClient } from "./client-C_DYiXeu.mjs";
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-D2L3_KTK.mjs";
4
+ import { r as readProjectConfig } from "./project-DhB4A8_g.mjs";
5
5
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
6
6
  import { readFileSync } from "node:fs";
7
7
  //#region src/cli/secret.ts
@@ -1,5 +1,5 @@
1
1
  import { a as join, o as relative } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { c as R } from "./dist-Dayj3gCK.mjs";
2
+ import { c as R } from "./dist-D2L3_KTK.mjs";
3
3
  import { r as getPackageDir } from "./agents-DqkFfc2c.mjs";
4
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, readlinkSync, symlinkSync } from "node:fs";
5
5
  //#region src/cli/skills.ts
@@ -1,5 +1,5 @@
1
- import { s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
- import { a as F, b as z, d as _t, m as et, o as H, r as E, s as J, t as $ } from "./dist-Dayj3gCK.mjs";
1
+ import { s as import_picocolors } from "./output-D3g5otMC.mjs";
2
+ import { a as F, b as z, d as _t, m as et, o as H, r as E, s as J, t as $ } from "./dist-D2L3_KTK.mjs";
3
3
  //#region src/cli/subcommand-prompt.ts
4
4
  function promptSubcommand(command, subcommands) {
5
5
  return new Promise((resolve) => {
@@ -1,6 +1,6 @@
1
1
  import { n as __exportAll } from "./chunk-DJd-R1mw.mjs";
2
2
  import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
3
- import { i as stripSqlExt, r as readJournal } from "./collect-CjeZgz5D.mjs";
3
+ import { i as stripSqlExt, r as readJournal } from "./collect-HqAuilH6.mjs";
4
4
  import { existsSync, readdirSync } from "node:fs";
5
5
  //#region src/migrations/validate.ts
6
6
  var validate_exports = /* @__PURE__ */ __exportAll({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "0.7.10",
3
+ "version": "0.7.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/voidzero-dev/void.git",
@@ -332,7 +332,7 @@
332
332
  "valibot": ">=1.0.0-beta.7",
333
333
  "vite": "^8.0.0",
334
334
  "zod": "^3.25.0 || ^4.0.0",
335
- "@void/md": "0.7.10"
335
+ "@void/md": "0.7.12"
336
336
  },
337
337
  "peerDependenciesMeta": {
338
338
  "@void/md": {
File without changes
File without changes
File without changes